Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3539386pxf; Mon, 29 Mar 2021 05:11:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8SzdXhS3FTWGtZwE9J0hD2zhBNf9M1A1cZg4wcwzBGbCNaoAz6WkGZIi+C5I53nbnonwQ X-Received: by 2002:a50:fc08:: with SMTP id i8mr23022262edr.277.1617019898590; Mon, 29 Mar 2021 05:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617019898; cv=none; d=google.com; s=arc-20160816; b=JQj2JPAcciE9aUIW6aj4Su97JQYjo/9CEHHLVJBxLZ2X6LGOBQQfCNt/1nWYPvDAv/ iosCEvYhwvuHojfJHLxgL8Sj0abHFobYVjUmiFJBZXFW0Pz8TXxARuSZMDWQZzQL4QSL TDkYBEuT5tnksa5KZIhflgz5+QNi3/+EVBxNT7ie6P2yww34HSkD9iCCoYy1db88Lglv Ke5CeLF8aaIEqCNU5Op2MuFzAT0mCKV56iVxNz+ysYqAAJ2OWr77YqBK5/Z5WwZBwDV/ fDm7BrXsYzFzoY1oHHUqIV61TE5jhkdRnytJhXq/CLHKNDNY54iRp2BJ1I/BPVZ3B828 glSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/+C1aDdX5ZnBhm4hDpxxgedP3qAZVDUTJ/79BcI5I3g=; b=TaQR1FNKAwvaeAiy3pyWMfrtJs0CsFmZZUVBWKEEYVAv0uaSJFYvF9rkwQXs3Wy4mB wIsRL9uvEHKAr0r94IXosfGkKfsI5r+P3vFAXctxK7dLf7PQWpKMzAUcIF1GE5L1jIUl FZg6NGQZ8bFguiaKrivFqrqlPpbydWruvfn8+Sbl5EiBWizhUchKDCu1HUE+0FHEZENE yKHU2qFH7d0T0Wc+dgFiOH6Jn+7w/go/RqyeAPSfIT3IM10C4jQ7jFKS5JuNNSJG6uXf oRG6Le5+HUyN7OUViA3rVJcNdHktHQ0SrBCg33bsgwTqbsAhmUj2QbGxFr0y5perdKMC B/Yg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si13409830ejr.192.2021.03.29.05.11.15; Mon, 29 Mar 2021 05:11:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231691AbhC2MHs (ORCPT + 99 others); Mon, 29 Mar 2021 08:07:48 -0400 Received: from outbound-smtp24.blacknight.com ([81.17.249.192]:60804 "EHLO outbound-smtp24.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231574AbhC2MHl (ORCPT ); Mon, 29 Mar 2021 08:07:41 -0400 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp24.blacknight.com (Postfix) with ESMTPS id E0F4BC0ACB for ; Mon, 29 Mar 2021 13:07:39 +0100 (IST) Received: (qmail 19422 invoked from network); 29 Mar 2021 12:07:39 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPA; 29 Mar 2021 12:07:39 -0000 From: Mel Gorman To: Linux-MM Cc: Linux-RT-Users , LKML , Chuck Lever , Jesper Dangaard Brouer , Matthew Wilcox , Mel Gorman Subject: [PATCH 4/6] mm/vmstat: Inline NUMA event counter updates Date: Mon, 29 Mar 2021 13:06:46 +0100 Message-Id: <20210329120648.19040-5-mgorman@techsingularity.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210329120648.19040-1-mgorman@techsingularity.net> References: <20210329120648.19040-1-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __count_numa_event is small enough to be treated similarly to __count_vm_event so inline it. Signed-off-by: Mel Gorman --- include/linux/vmstat.h | 9 +++++++++ mm/vmstat.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index fc14415223c5..dde4dec4e7dd 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -237,6 +237,15 @@ static inline unsigned long zone_page_state_snapshot(struct zone *zone, } #ifdef CONFIG_NUMA +/* See __count_vm_event comment on why raw_cpu_inc is used. */ +static inline void +__count_numa_event(struct zone *zone, enum numa_stat_item item) +{ + struct per_cpu_zonestat __percpu *pzstats = zone->per_cpu_zonestats; + + raw_cpu_inc(pzstats->vm_numa_event[item]); +} + extern void __count_numa_event(struct zone *zone, enum numa_stat_item item); extern unsigned long sum_zone_node_page_state(int node, enum zone_stat_item item); diff --git a/mm/vmstat.c b/mm/vmstat.c index 46bc61184afc..a326483dd4ab 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -906,15 +906,6 @@ void drain_zonestat(struct zone *zone, struct per_cpu_zonestat *pzstats) #endif #ifdef CONFIG_NUMA -/* See __count_vm_event comment on why raw_cpu_inc is used. */ -void __count_numa_event(struct zone *zone, - enum numa_stat_item item) -{ - struct per_cpu_zonestat __percpu *pzstats = zone->per_cpu_zonestats; - - raw_cpu_inc(pzstats->vm_numa_event[item]); -} - /* * Determine the per node value of a stat item. This function * is called frequently in a NUMA machine, so try to be as -- 2.26.2