No. The original code used the priority, but I removed that because I
found it so tasteless.
>I missed the reason of using always priority 0 for kmem_cache_reap().
>Is its reaping mechanism so broken?
The whole idea of trying to keep unused cached objects around only to
avoid initializing them when we're low of memory is just extremely
broken, imnsho. We want to avoid having to do IO in order to free
memory, and that definitely means that any kmem caches need to flush out
completely - there is no point in trickling them out as far as I can
see.
I have considered moving the slab trimming altogether out of the loop,
and just do it unconditionally before even entering the loop. That would
trim it more aggressively. David, could you try that and see if it works
for your case?
Linus