Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756210Ab2BFW4n (ORCPT ); Mon, 6 Feb 2012 17:56:43 -0500 Received: from cantor2.suse.de ([195.135.220.15]:48302 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756126Ab2BFW4e (ORCPT ); Mon, 6 Feb 2012 17:56:34 -0500 From: Mel Gorman To: Andrew Morton Cc: Linux-MM , Linux-Netdev , LKML , David Miller , Neil Brown , Peter Zijlstra , Mel Gorman Subject: [PATCH 15/15] mm: Account for the number of times direct reclaimers get throttled Date: Mon, 6 Feb 2012 22:56:18 +0000 Message-Id: <1328568978-17553-16-git-send-email-mgorman@suse.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1328568978-17553-1-git-send-email-mgorman@suse.de> References: <1328568978-17553-1-git-send-email-mgorman@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1995 Lines: 58 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 --- include/linux/vm_event_item.h | 1 + mm/vmscan.c | 1 + mm/vmstat.c | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h index 03b90cdc..652e5f3 100644 --- a/include/linux/vm_event_item.h +++ b/include/linux/vm_event_item.h @@ -29,6 +29,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, FOR_ALL_ZONES(PGSTEAL), 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 87ae4314..7a43551 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2464,6 +2464,7 @@ static void throttle_direct_reclaim(gfp_t gfp_mask, struct zonelist *zonelist, return; /* Throttle */ + count_vm_event(PGSCAN_DIRECT_THROTTLE); wait_event_killable(zone->zone_pgdat->pfmemalloc_wait, pfmemalloc_watermark_ok(zone->zone_pgdat)); } diff --git a/mm/vmstat.c b/mm/vmstat.c index f600557..0fff13d 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -741,6 +741,7 @@ const char * const vmstat_text[] = { TEXTS_FOR_ZONES("pgsteal") TEXTS_FOR_ZONES("pgscan_kswapd") TEXTS_FOR_ZONES("pgscan_direct") + "pgscan_direct_throttle", #ifdef CONFIG_NUMA "zone_reclaim_failed", -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/