Re: [PATCH v4 1/4] mm/slub: enable debugging memory wasting of kmalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/5/22 09:06, Feng Tang wrote:
> On Mon, Sep 05, 2022 at 02:29:51PM +0800, Vlastimil Babka wrote:
>> 
>> How about get_partial() instantiates an on-stack structure that contains
>> gfpflags, ret_slab, orig_size and passes pointer to that to all the nested
>> functions.
>> 
>> Would be similar to "struct alloc_context" in page allocation.
>> Something like "struct partial_context pc"?
> 
> Yep! This would make the parameters passing much tidier. Will try
> this way. 
> 
> More aggressively is to also embed the 'kmem_cache' parameter into
> it, but this may make the code look ambiguous.

That one is used a lot everywhere, so it would be tedious to dereference it
from a struct, and also might be a bit better code if it's in a register.

> Thanks,
> Feng
> 
> 





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux