• Andrew Morton's avatar
    [PATCH] pagecache accounting speedup · 34f2047d
    Andrew Morton authored
    From: Alex Tomas <bzzz@tmi.comex.ru>
    
    This is the second half of the vm_enough_memory() speedup.
    
    When overcommit_memory != 1, vm_enough_memory() calls get_page_state() to
    calculate the amount of used pagecache.  It does this on every call to
    sys_brk().
    
    get_page_state() is really expensive on SMP.
    
    So the patch arranges for pagecache accounting to be in a global atomic_t,
    with per-cpu batching and approximate accounting to amortise the cost of the
    global atomic.
    
    The nr_pagecache field of /proc/vmstat is removed.
    34f2047d
proc_misc.c 16.3 KB