So I made a note to myself a while back to have a look at what this struct reclaim_state thing was all about. It turns out it's referenced in WAY too many places for what it does. The idea is that during memory reclaim, we want to keep track of how many pages get freed up by the various slab shrinkers. The memory is eventually freed in kmem_freepages() and there is not convenient place to store the number of slab pages we freed. So, at some point in history, we decided to store it in the current task's task structure. Unfortunately we decided to store it in a really obfuscated way that made my brain hurt. So I ripped it out. The only place that *ever* updates current->reclaim_state->reclaimed_slab to be anything but 0 is kmem_freepages(). The only places that give a woozy wombat's bottom about the value of reclaimed_slab are try_to_free_pages() & balance_pgdat(). These two functions zero current->reclaim_state->reclaimed_slab, call shrink_slab(), then look at the value. Since shrink_slab() currently returns 0 no matter what happens, I changed it to return the number of slab pages freed. This saves us 30 lines of code, makes the what's going on much more clear, and may even be a smidge faster. It builds, boots, and survives kernbench runs on i386. mcd@arrakis:~/linux/source $ diffstat ~/linux/patches/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 | 26 ++++++-------------------- 5 files changed, 8 insertions(+), 38 deletions(-) -Matt