From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932436AbcK1JYY (ORCPT ); Mon, 28 Nov 2016 04:24:24 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35872 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932240AbcK1JYU (ORCPT ); Mon, 28 Nov 2016 04:24:20 -0500 Date: Mon, 28 Nov 2016 10:24:17 +0100 From: Michal Hocko To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, rt@linutronix.de, tglx@linutronix.de, Andrew Morton , Vlastimil Babka , Mel Gorman , Johannes Weiner , linux-mm@kvack.org Subject: Re: [PATCH 07/22] mm/vmstat: Drop get_online_cpus() from init_cpu_node_state/vmstat_cpu_dead() Message-ID: <20161128092415.GB14835@dhcp22.suse.cz> References: <20161126231350.10321-1-bigeasy@linutronix.de> <20161126231350.10321-8-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161126231350.10321-8-bigeasy@linutronix.de> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 27-11-16 00:13:35, Sebastian Andrzej Siewior wrote: > Both functions are called with protection against cpu hotplug already so > *_online_cpus() could be dropped. > > Cc: Andrew Morton > Cc: Vlastimil Babka > Cc: Mel Gorman > Cc: Johannes Weiner > Cc: linux-mm@kvack.org > Signed-off-by: Sebastian Andrzej Siewior Acked-by: Michal Hocko > --- > mm/vmstat.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/mm/vmstat.c b/mm/vmstat.c > index 604f26a4f696..0b63ffb5c407 100644 > --- a/mm/vmstat.c > +++ b/mm/vmstat.c > @@ -1722,24 +1722,19 @@ static void __init init_cpu_node_state(void) > { > int cpu; > > - get_online_cpus(); > for_each_online_cpu(cpu) > node_set_state(cpu_to_node(cpu), N_CPU); > - put_online_cpus(); > } > > static void vmstat_cpu_dead(int node) > { > int cpu; > > - get_online_cpus(); > for_each_online_cpu(cpu) > if (cpu_to_node(cpu) == node) > - goto end; > + return; > > node_clear_state(node, N_CPU); > -end: > - put_online_cpus(); > } > > /* > -- > 2.10.2 > > -- > 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 -- Michal Hocko SUSE Labs