• Christoph Lameter's avatar
    [PATCH] ZVC/zone_reclaim: Leave 1% of unmapped pagecache pages for file I/O · 9614634f
    Christoph Lameter authored
    It turns out that it is advantageous to leave a small portion of unmapped file
    backed pages if all of a zone's pages (or almost all pages) are allocated and
    so the page allocator has to go off-node.
    
    This allows recently used file I/O buffers to stay on the node and
    reduces the times that zone reclaim is invoked if file I/O occurs
    when we run out of memory in a zone.
    
    The problem is that zone reclaim runs too frequently when the page cache is
    used for file I/O (read write and therefore unmapped pages!) alone and we have
    almost all pages of the zone allocated.  Zone reclaim may remove 32 unmapped
    pages.  File I/O will use these pages for the next read/write requests and the
    unmapped pages increase.  After the zone has filled up again zone reclaim will
    remove it again after only 32 pages.  This cycle is too inefficient and there
    are potentially too many zone reclaim cycles.
    
    With the 1% boundary we may still remove all unmapped pages for file I/O in
    zone reclaim pass.  However.  it will take a large number of read and writes
    to get back to 1% again where we trigger zone reclaim again.
    
    The zone reclaim 2.6.16/17 does not show this behavior because we have a 30
    second timeout.
    
    [akpm@osdl.org: rename the /proc file and the variable]
    Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    9614634f
Name
Last commit
Last update
..
acpi Loading commit data...
asm-alpha Loading commit data...
asm-arm Loading commit data...
asm-arm26 Loading commit data...
asm-cris Loading commit data...
asm-frv Loading commit data...
asm-generic Loading commit data...
asm-h8300 Loading commit data...
asm-i386 Loading commit data...
asm-ia64 Loading commit data...
asm-m32r Loading commit data...
asm-m68k Loading commit data...
asm-m68knommu Loading commit data...
asm-mips Loading commit data...
asm-parisc Loading commit data...
asm-powerpc Loading commit data...
asm-ppc Loading commit data...
asm-s390 Loading commit data...
asm-sh Loading commit data...
asm-sh64 Loading commit data...
asm-sparc Loading commit data...
asm-sparc64 Loading commit data...
asm-um Loading commit data...
asm-v850 Loading commit data...
asm-x86_64 Loading commit data...
asm-xtensa Loading commit data...
keys Loading commit data...
linux Loading commit data...
math-emu Loading commit data...
media Loading commit data...
mtd Loading commit data...
net Loading commit data...
pcmcia Loading commit data...
rdma Loading commit data...
rxrpc Loading commit data...
scsi Loading commit data...
sound Loading commit data...
video Loading commit data...