Staging
v0.5.1
https://github.com/torvalds/linux
Revision ea164d73a7a0b2b2be3a1d8c2a8a4dab8999fa9c authored by Andrea Arcangeli on 28 November 2005, 21:44:15 UTC, committed by Linus Torvalds on 28 November 2005, 22:42:26 UTC
With Andrew Morton <akpm@osdl.org>

The slab scanning code tries to balance the scanning rate of slabs versus the
scanning rate of LRU pages.  To do this, it retains state concerning how many
slabs have been scanned - if a particular slab shrinker didn't scan enough
objects, we remember that for next time, and scan more objects on the next
pass.

The problem with this is that with (say) a huge number of GFP_NOIO
direct-reclaim attempts, the number of objects which are to be scanned when we
finally get a GFP_KERNEL request can be huge.  Because some shrinker handlers
just bail out if !__GFP_FS.

So the patch clamps the number of objects-to-be-scanned to 2* the total number
of objects in the slab cache.

Signed-off-by: Andrea Arcangeli <andrea@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 154f484
History
Tip revision: ea164d73a7a0b2b2be3a1d8c2a8a4dab8999fa9c authored by Andrea Arcangeli on 28 November 2005, 21:44:15 UTC
[PATCH] shrinker->nr = LONG_MAX means deadlock for icache
Tip revision: ea164d7
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 391 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 87.5 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 63.4 KB
Makefile -rw-r--r-- 42.8 KB
README -rw-r--r-- 14.7 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top