From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by kanga.kvack.org (Postfix) with ESMTP id 90300828E1 for ; Tue, 21 Jun 2016 10:20:44 -0400 (EDT) Received: by mail-lb0-f200.google.com with SMTP id js8so14987243lbc.2 for ; Tue, 21 Jun 2016 07:20:44 -0700 (PDT) Received: from outbound-smtp03.blacknight.com (outbound-smtp03.blacknight.com. [81.17.249.16]) by mx.google.com with ESMTPS id p196si4154011wmb.32.2016.06.21.07.20.43 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 21 Jun 2016 07:20:43 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp03.blacknight.com (Postfix) with ESMTPS id 196BD98B29 for ; Tue, 21 Jun 2016 14:20:43 +0000 (UTC) From: Mel Gorman Subject: [PATCH 26/27] mm: vmstat: Replace __count_zone_vm_events with a zone id equivalent Date: Tue, 21 Jun 2016 15:16:05 +0100 Message-Id: <1466518566-30034-27-git-send-email-mgorman@techsingularity.net> In-Reply-To: <1466518566-30034-1-git-send-email-mgorman@techsingularity.net> References: <1466518566-30034-1-git-send-email-mgorman@techsingularity.net> Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton , Linux-MM Cc: Rik van Riel , Vlastimil Babka , Johannes Weiner , LKML , Mel Gorman This is partially a preparation patch for more vmstat work but it also has the slight advantage that __count_zid_vm_events is cheaper to calculate than __count_zone_vm_events(). Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka --- include/linux/vmstat.h | 5 ++--- mm/page_alloc.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index c31f8dc6121c..1cab6dd300ac 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -107,9 +107,8 @@ static inline void vm_events_fold_cpu(int cpu) #define count_vm_vmacache_event(x) do {} while (0) #endif -#define __count_zone_vm_events(item, zone, delta) \ - __count_vm_events(item##_NORMAL - ZONE_NORMAL + \ - zone_idx(zone), delta) +#define __count_zid_vm_events(item, zid, delta) \ + __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta) /* * Zone and node-based page accounting with per cpu differentials. diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6d0a527cff3d..f5b4f5a372fc 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2621,7 +2621,7 @@ struct page *buffered_rmqueue(struct zone *preferred_zone, get_pcppage_migratetype(page)); } - __count_zone_vm_events(PGALLOC, zone, 1 << order); + __count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order); zone_statistics(preferred_zone, zone, gfp_flags); local_irq_restore(flags); -- 2.6.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org