[PATCH v2 10/20] nvme-auth: guarantee dhchap buffers under memory pressure

Sagi Grimberg sagi at grimberg.me
Tue Nov 15 00:09:57 PST 2022


>> We want to guarantee that we have chap buffers when a controller
>> reconnects under memory pressure. Add a mempool specifically
>> for that.
>>
>> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
>> ---
>>    drivers/nvme/host/auth.c | 30 ++++++++++++++++++++++++++++--
>>    drivers/nvme/host/core.c |  6 ++++++
>>    drivers/nvme/host/nvme.h |  7 +++++++
>>    3 files changed, 41 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
>> index 4d288333b0fd..4bfe9ecda12a 100644
>> --- a/drivers/nvme/host/auth.c
>> +++ b/drivers/nvme/host/auth.c
>> @@ -14,6 +14,8 @@
>>    #include <linux/nvme-auth.h>
>>    
>>    #define CHAP_BUF_SIZE 4096
>> +struct kmem_cache *nvme_chap_buf_cache;
>> +mempool_t *nvme_chap_buf_pool;
>>    
> 
> is there a reason they are not declared as static ?

No reason, they should.
If I post another series, this will be fixed, if not this
can be folded when applying the series...



More information about the Linux-nvme mailing list