Re: Large slab cache in 2.6.1

Nick Piggin
2004-02-23T00:30:02Z

Linus Torvalds wrote:

>
>On Sat, 21 Feb 2004, Andrew Morton wrote:
>
>>yeah. We should have made that change when making shrink_slab() ignore
>>highmem scanning.
>>
>>Something like this (the function needs a rename)
>>
>
>Why not just pass in the list of zones? That way the _caller_ determines
>what zones he is interested in.
>
>So just add a "struct zonelist *zonelist" as the argument, the same way
>"__alloc_pages()" has..
>
>

The caller might as well just pass in the total size of all
LRUs that it has scanned. It has to traverse the zones anyway,
and this enables it to take the size *before* shrinking, which
gives you a better number.