]> git.hungrycats.org Git - linux/commit
[PATCH] slab memory shrinking balancing fix
authorAndrew Morton <akpm@osdl.org>
Sat, 31 Jul 2004 07:47:41 +0000 (00:47 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 31 Jul 2004 07:47:41 +0000 (00:47 -0700)
commited158dc1d27a3715d6788f3082fc7769d2023e4c
treeeecac71aa4101f1a7c5c8e216e635467c6745d7d
parentf44ba7d6adf95c410c2dcd8618f511210f02bde9
[PATCH] slab memory shrinking balancing fix

The logic in shrink_slab tries to balance the proportion of slab which it
scans against the proportion of pagecache which the caller scanned.  Problem
is that with a large number of highmem LRU pages and a small number of lowmem
LRU pages, the amount of pagecache scanning appears to be very small, so we
don't push slab hard enough.

The patch changes things so that for, say, a GFP_KERNEL allocation attempt we
only consider ZONE_NORMAL and ZONE_DMA when calculating "what proportion of
the LRU did the caller just scan".

This will have the effect of shrinking slab harder in response to GFP_KERNEL
allocations than for GFP_HIGHMEM allocations.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/mm.h
mm/page_alloc.c
mm/vmscan.c