lkml.org 
[lkml]   [2012]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 17/17] mm: Account for the number of times direct reclaimers get throttled
    Date
    Under significant pressure when writing back to network-backed storage,
    direct reclaimers may get throttled. This is expected to be a
    short-lived event and the processes get woken up again but processes do
    get stalled. This patch counts how many times such stalling occurs. It's
    up to the administrator whether to reduce these stalls by increasing
    min_free_kbytes.

    Signed-off-by: Mel Gorman <mgorman@suse.de>
    ---
    include/linux/vm_event_item.h | 1 +
    mm/vmscan.c | 3 +++
    mm/vmstat.c | 1 +
    3 files changed, 5 insertions(+)

    diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h
    index 06f8e38..57f7b10 100644
    --- a/include/linux/vm_event_item.h
    +++ b/include/linux/vm_event_item.h
    @@ -30,6 +30,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
    FOR_ALL_ZONES(PGSTEAL_DIRECT),
    FOR_ALL_ZONES(PGSCAN_KSWAPD),
    FOR_ALL_ZONES(PGSCAN_DIRECT),
    + PGSCAN_DIRECT_THROTTLE,
    #ifdef CONFIG_NUMA
    PGSCAN_ZONE_RECLAIM_FAILED,
    #endif
    diff --git a/mm/vmscan.c b/mm/vmscan.c
    index 97c766f..141ab5c 100644
    --- a/mm/vmscan.c
    +++ b/mm/vmscan.c
    @@ -2486,6 +2486,9 @@ static void throttle_direct_reclaim(gfp_t gfp_mask, struct zonelist *zonelist,
    if (pfmemalloc_watermark_ok(pgdat))
    return;

    + /* Account for the throttling */
    + count_vm_event(PGSCAN_DIRECT_THROTTLE);
    +
    /*
    * If the caller cannot enter the filesystem, it's possible that it
    * is due to the caller holding an FS lock or performing a journal
    diff --git a/mm/vmstat.c b/mm/vmstat.c
    index 7db1b9b..7861cbe 100644
    --- a/mm/vmstat.c
    +++ b/mm/vmstat.c
    @@ -742,6 +742,7 @@ const char * const vmstat_text[] = {
    TEXTS_FOR_ZONES("pgsteal_direct")
    TEXTS_FOR_ZONES("pgscan_kswapd")
    TEXTS_FOR_ZONES("pgscan_direct")
    + "pgscan_direct_throttle",

    #ifdef CONFIG_NUMA
    "zone_reclaim_failed",
    --
    1.7.9.2


    \
     
     \ /
      Last update: 2012-05-10 16:21    [W:0.023 / U:30.612 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site