lkml.org 
[lkml]   [2011]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch] vmstat: account page allocation failures
    Just for your reference.

    It seems not necessary given that page allocation failure rate is no long high.

    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
    ---
    include/linux/mmzone.h | 1 +
    mm/page_alloc.c | 2 ++
    mm/vmstat.c | 1 +
    3 files changed, 4 insertions(+)

    --- linux-next.orig/include/linux/mmzone.h 2011-04-28 21:34:30.000000000 +0800
    +++ linux-next/include/linux/mmzone.h 2011-04-28 21:34:35.000000000 +0800
    @@ -106,6 +106,7 @@ enum zone_stat_item {
    NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */
    NR_DIRTIED, /* page dirtyings since bootup */
    NR_WRITTEN, /* page writings since bootup */
    + NR_ALLOC_FAIL,
    #ifdef CONFIG_NUMA
    NUMA_HIT, /* allocated in intended node */
    NUMA_MISS, /* allocated in non intended node */
    --- linux-next.orig/mm/page_alloc.c 2011-04-28 21:34:34.000000000 +0800
    +++ linux-next/mm/page_alloc.c 2011-04-28 21:34:35.000000000 +0800
    @@ -2165,6 +2165,8 @@ rebalance:
    }

    nopage:
    + inc_zone_state(preferred_zone, NR_ALLOC_FAIL);
    + /* count_zone_vm_events(PGALLOCFAIL, preferred_zone, 1 << order); */
    if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) {
    unsigned int filter = SHOW_MEM_FILTER_NODES;

    --- linux-next.orig/mm/vmstat.c 2011-04-28 21:34:30.000000000 +0800
    +++ linux-next/mm/vmstat.c 2011-04-28 21:34:35.000000000 +0800
    @@ -879,6 +879,7 @@ static const char * const vmstat_text[]
    "nr_shmem",
    "nr_dirtied",
    "nr_written",
    + "nr_alloc_fail",

    #ifdef CONFIG_NUMA
    "numa_hit",

    \
     
     \ /
      Last update: 2011-04-28 15:41    [W:0.020 / U:2.028 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site