Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759426Ab1D1Nio (ORCPT ); Thu, 28 Apr 2011 09:38:44 -0400 Received: from mga02.intel.com ([134.134.136.20]:19215 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752479Ab1D1Nim (ORCPT ); Thu, 28 Apr 2011 09:38:42 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.64,280,1301900400"; d="scan'208";a="635324290" Date: Thu, 28 Apr 2011 21:38:38 +0800 From: Wu Fengguang To: Andrew Morton Cc: Minchan Kim , Dave Young , linux-mm , Linux Kernel Mailing List , Mel Gorman , KAMEZAWA Hiroyuki , KOSAKI Motohiro , Christoph Lameter , Dave Chinner , David Rientjes Subject: [patch] vmstat: account page allocation failures Message-ID: <20110428133838.GA12573@localhost> References: <20110426055521.GA18473@localhost> <20110426062535.GB19717@localhost> <20110426063421.GC19717@localhost> <20110426092029.GA27053@localhost> <20110426124743.e58d9746.akpm@linux-foundation.org> <20110428133644.GA12400@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110428133644.GA12400@localhost> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1736 Lines: 47 Just for your reference. It seems not necessary given that page allocation failure rate is no long high. Signed-off-by: Wu Fengguang --- 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", -- 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/