[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161128092415.GB14835@dhcp22.suse.cz>
Date: Mon, 28 Nov 2016 10:24:17 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org, rt@...utronix.de, tglx@...utronix.de,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
Mel Gorman <mgorman@...hsingularity.net>,
Johannes Weiner <hannes@...xchg.org>, linux-mm@...ck.org
Subject: Re: [PATCH 07/22] mm/vmstat: Drop get_online_cpus() from
init_cpu_node_state/vmstat_cpu_dead()
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 <akpm@...ux-foundation.org>
> Cc: Vlastimil Babka <vbabka@...e.cz>
> Cc: Mel Gorman <mgorman@...hsingularity.net>
> Cc: Johannes Weiner <hannes@...xchg.org>
> Cc: linux-mm@...ck.org
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Acked-by: Michal Hocko <mhocko@...e.com>
> ---
> 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@...ck.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists