linux/include
Rik van Riel 556adecba1 vmscan: second chance replacement for anonymous pages
We avoid evicting and scanning anonymous pages for the most part, but
under some workloads we can end up with most of memory filled with
anonymous pages.  At that point, we suddenly need to clear the referenced
bits on all of memory, which can take ages on very large memory systems.

We can reduce the maximum number of pages that need to be scanned by not
taking the referenced state into account when deactivating an anonymous
page.  After all, every anonymous page starts out referenced, so why
check?

If an anonymous page gets referenced again before it reaches the end of
the inactive list, we move it back to the active list.

To keep the maximum amount of necessary work reasonable, we scale the
active to inactive ratio with the size of memory, using the formula
active:inactive ratio = sqrt(memory in GB * 10).

Kswapd CPU use now seems to scale by the amount of pageout bandwidth,
instead of by the amount of memory present in the system.

[kamezawa.hiroyu@jp.fujitsu.com: fix OOM with memcg]
[kamezawa.hiroyu@jp.fujitsu.com: memcg: lru scan fix]
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:50:25 -07:00
..
acpi include: replace __FUNCTION__ with __func__ 2008-10-16 11:21:30 -07:00
asm-arm [ARM] S3C24XX: Additional include moves 2008-10-07 23:09:51 +01:00
asm-cris [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
asm-frv FRV: Switch unaligned access to the packed-struct implementation 2008-10-16 15:06:54 -07:00
asm-generic Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2008-10-16 12:40:26 -07:00
asm-h8300 h8300: update timer handler - new files 2008-10-16 11:21:29 -07:00
asm-m32r [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
asm-m68k [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
asm-mn10300 [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
asm-parisc [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
asm-um [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
asm-x86 Merge branch 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-10-16 15:36:00 -07:00
asm-xtensa [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
crypto
drm radeon: fix PCI bus mastering support enables. 2008-10-18 07:10:54 +10:00
keys
linux vmscan: second chance replacement for anonymous pages 2008-10-20 08:50:25 -07:00
math-emu
media V4L/DVB (9276): videobuf-dvb: two functions are now static 2008-10-17 17:39:14 -03:00
mtd
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-10-16 11:26:26 -07:00
pcmcia
rdma
rxrpc
scsi [SCSI] iscsi_tcp: return a descriptive error value during connection errors 2008-10-13 09:29:00 -04:00
sound Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2008-10-13 14:03:59 -07:00
video fbdev: allow more chip revisions in Epson s1d13... video driver 2008-10-16 11:21:45 -07:00
xen
Kbuild