[PATCH 07/10] nvme-rdma: introduce NVME_RDMA_MAX_METADATA_QUEUE_SIZE definition

Max Gurtovoy mgurtovoy at nvidia.com
Mon Jan 1 02:57:14 PST 2024



On 01/01/2024 11:34, Sagi Grimberg wrote:
> Another completely arbitrary limit...
> Can this come somehow from the rdma core?
> 
> If not, its not making things any worse. So its fine by me.
> Please comment that this limit is based on testing the devices
> that support PI.
> 

We are not changing the logic for PI controllers at all in this commit.

I can say something like:

"... We'll keep the maximal queue size for metadata controllers to be 
128 since there are more resources that are needed for metadata 
operations and 128 is the optimal size found for metadata controllers 
based on testing.

> On 12/31/23 02:52, Max Gurtovoy wrote:
>> This definition will be used by controllers that are configured with
>> metadata support. For now, both regular and metadata controllers have
>> the same maximal queue size but later commit will increase the maximal
>> queue size for regular RDMA controllers to 256.
>> We'll keep the maximal queue size for metadata controller to be 128
>> since there are more resources that are needed for metadata operations.
>>
>> Reviewed-by: Israel Rukshin <israelr at nvidia.com>
>> Signed-off-by: Max Gurtovoy <mgurtovoy at nvidia.com>
>> ---
>>   drivers/nvme/target/rdma.c | 2 ++
>>   include/linux/nvme-rdma.h  | 3 ++-
>>   2 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
>> index 4597bca43a6d..f298295c0b0f 100644
>> --- a/drivers/nvme/target/rdma.c
>> +++ b/drivers/nvme/target/rdma.c
>> @@ -2002,6 +2002,8 @@ static u8 nvmet_rdma_get_mdts(const struct 
>> nvmet_ctrl *ctrl)
>>   static u16 nvmet_rdma_get_max_queue_size(const struct nvmet_ctrl *ctrl)
>>   {
>> +    if (ctrl->pi_support)
>> +        return NVME_RDMA_MAX_METADATA_QUEUE_SIZE;
>>       return NVME_RDMA_MAX_QUEUE_SIZE;
>>   }
>> diff --git a/include/linux/nvme-rdma.h b/include/linux/nvme-rdma.h
>> index 146dd2223a5f..d0b9941911a1 100644
>> --- a/include/linux/nvme-rdma.h
>> +++ b/include/linux/nvme-rdma.h
>> @@ -8,7 +8,8 @@
>>   #define NVME_RDMA_IP_PORT        4420
>> -#define NVME_RDMA_MAX_QUEUE_SIZE    128
>> +#define NVME_RDMA_MAX_QUEUE_SIZE 128
>> +#define NVME_RDMA_MAX_METADATA_QUEUE_SIZE 128
>>   enum nvme_rdma_cm_fmt {
>>       NVME_RDMA_CM_FMT_1_0 = 0x0,



More information about the Linux-nvme mailing list