Andrew Morton wrote: > Matthew Dobson wrote: > >>Since shrink_slab() currently returns 0 no matter what happens, >> I changed it to return the number of slab pages freed. > > > A sane cleanup, but it conflicts with vmscan-notice-slab-shrinking.patch, > which returns a different thing from shrink_slab() in order to account for > slab reclaim only causing internal fragmentation and not actually freeing > pages yet. > > vmscan-notice-slab-shrinking.patch isn't quite complete yet, but we do need > to do something along these lines. I need to get back onto it. I hadn't seen that patch... These can coexist fairly easily, though. I can change my patch to zero and then read current->reclaimed_slab *outside* the call to shrink_slab. It unfortunately shrinks less lines of code, and leaves the hack that is current->reclaimed_slab exposed to more than one function, but... How's this look? mcd@arrakis:~/linux/patches $ diffstat remove-reclaim_state.patch include/linux/sched.h | 3 +-- include/linux/swap.h | 8 -------- mm/page_alloc.c | 6 ------ mm/slab.c | 3 +-- mm/vmscan.c | 21 ++++----------------- 5 files changed, 6 insertions(+), 35 deletions(-) -Matt