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
File Mode Size
irq
power
Kconfig.hz -rw-r--r-- 1.2 KB
Kconfig.preempt -rw-r--r-- 2.3 KB
Makefile -rw-r--r-- 2.2 KB
acct.c -rw-r--r-- 15.7 KB
audit.c -rw-r--r-- 24.6 KB
auditsc.c -rw-r--r-- 33.4 KB
capability.c -rw-r--r-- 6.3 KB
compat.c -rw-r--r-- 21.3 KB
configs.c -rw-r--r-- 3.3 KB
cpu.c -rw-r--r-- 4.9 KB
cpuset.c -rw-r--r-- 52.9 KB
crash_dump.c -rw-r--r-- 1.6 KB
dma.c -rw-r--r-- 3.5 KB
exec_domain.c -rw-r--r-- 4.3 KB
exit.c -rw-r--r-- 39.7 KB
extable.c -rw-r--r-- 2.0 KB
fork.c -rw-r--r-- 32.1 KB
futex.c -rw-r--r-- 21.4 KB
intermodule.c -rw-r--r-- 5.1 KB
itimer.c -rw-r--r-- 6.7 KB
kallsyms.c -rw-r--r-- 10.4 KB
kexec.c -rw-r--r-- 27.1 KB
kfifo.c -rw-r--r-- 4.6 KB
kmod.c -rw-r--r-- 7.6 KB
kprobes.c -rw-r--r-- 16.2 KB
ksysfs.c -rw-r--r-- 1.5 KB
kthread.c -rw-r--r-- 4.9 KB
module.c -rw-r--r-- 56.4 KB
panic.c -rw-r--r-- 4.0 KB
params.c -rw-r--r-- 16.8 KB
pid.c -rw-r--r-- 7.5 KB
posix-cpu-timers.c -rw-r--r-- 41.2 KB
posix-timers.c -rw-r--r-- 43.6 KB
printk.c -rw-r--r-- 26.2 KB
profile.c -rw-r--r-- 14.9 KB
ptrace.c -rw-r--r-- 10.6 KB
rcupdate.c -rw-r--r-- 14.9 KB
rcutorture.c -rw-r--r-- 14.6 KB
resource.c -rw-r--r-- 11.6 KB
sched.c -rw-r--r-- 142.0 KB
seccomp.c -rw-r--r-- 1.1 KB
signal.c -rw-r--r-- 67.6 KB
softirq.c -rw-r--r-- 11.1 KB
softlockup.c -rw-r--r-- 3.5 KB
spinlock.c -rw-r--r-- 7.9 KB
stop_machine.c -rw-r--r-- 4.8 KB
sys.c -rw-r--r-- 43.2 KB
sys_ni.c -rw-r--r-- 2.5 KB
sysctl.c -rw-r--r-- 56.7 KB
time.c -rw-r--r-- 15.4 KB
timer.c -rw-r--r-- 41.5 KB
uid16.c -rw-r--r-- 4.2 KB
user.c -rw-r--r-- 4.4 KB
wait.c -rw-r--r-- 7.1 KB
workqueue.c -rw-r--r-- 13.9 KB

back to top