[Devel] [PATCH VZ9 0/2] dm-qcow2: add a memory pool for big buffer allocations

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Mon Nov 18 09:29:21 MSK 2024


 From the third glance it is fine, as for GFP_NOIO kvmalloc only does 
kmalloc allocation and do not try vmalloc. Series is fine, but I will 
resend it anyway, cause I found that there is already a patch in 
mainstream which dublicates my first patch.

On 11/18/24 14:20, Pavel Tikhomirov wrote:
> Oh, from the second glance, it looks like I can't use kvmalloc for the 
> pool allocation as mempool_alloc tries to call mempool_t->alloc directly 
> first, and only then fallbacks to elements from pool, but kvmalloc is 
> not good for GFP_NOIO allocations...
> 
> Please disregard this series, I will try to come up with something 
> better. Probably I just need to switch to kmalloc if see GFP_NOIO in flags.
> 
> On 11/18/24 13:54, Pavel Tikhomirov wrote:
>> note: not yet fully tested (waiting for reproduce)
>>
>> https://virtuozzo.atlassian.net/browse/VSTOR-94596
>> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
>>
>> Pavel Tikhomirov (2):
>>    mempool: add kvmalloc/kvfree version
>>    dm-qcow2: add memory pool for compression buffers
>>
>>   drivers/md/dm-qcow2-map.c    | 18 ++++++++++++++----
>>   drivers/md/dm-qcow2-target.c | 18 ++++++++++++++++--
>>   include/linux/mempool.h      | 15 +++++++++++++++
>>   mm/mempool.c                 | 13 +++++++++++++
>>   4 files changed, 58 insertions(+), 6 deletions(-)
>>
> 

-- 
Best regards, Tikhomirov Pavel
Senior Software Developer, Virtuozzo.



More information about the Devel mailing list