• Andrew Morton's avatar
    [PATCH] fix page alloc/free accounting · 3e4c5912
    Andrew Morton authored
    We're currently incrementing /proc/vmstat:pgalloc in front of the
    per-cpu page queues, and incrementing /proc/vmstat:pgfree behind the
    per-cpu queues.  So they get out of whack.
    
    Change it so that we increment the counters each time someone requests
    a page.  ie: they're both in front of the queues.
    
    Also, remove a duplicated prep_new_page() call and as a consequence,
    drop the whole additional list walk in rmqueue_bulk().
    3e4c5912
page_alloc.c 33.1 KB