Re: [PATCH 08/22] mm/vmstat: Avoid on each online CPU loops

2016-11-29 Thread Michal Hocko
On Tue 29-11-16 15:08:10, Thomas Gleixner wrote: > On Mon, 28 Nov 2016, Michal Hocko wrote: > > On Sun 27-11-16 00:13:36, Sebastian Andrzej Siewior wrote: > > [...] > > > static void __init init_cpu_node_state(void) > > > { > > > - int cpu; > > > + int node; > > > > > > - for_each_online_cpu(cp

Re: [PATCH 08/22] mm/vmstat: Avoid on each online CPU loops

2016-11-29 Thread Thomas Gleixner
On Mon, 28 Nov 2016, Michal Hocko wrote: > On Sun 27-11-16 00:13:36, Sebastian Andrzej Siewior wrote: > [...] > > static void __init init_cpu_node_state(void) > > { > > - int cpu; > > + int node; > > > > - for_each_online_cpu(cpu) > > - node_set_state(cpu_to_node(cpu), N_CPU); >

Re: [PATCH 08/22] mm/vmstat: Avoid on each online CPU loops

2016-11-28 Thread Michal Hocko
On Sun 27-11-16 00:13:36, Sebastian Andrzej Siewior wrote: [...] > static void __init init_cpu_node_state(void) > { > - int cpu; > + int node; > > - for_each_online_cpu(cpu) > - node_set_state(cpu_to_node(cpu), N_CPU); > + for_each_online_node(node) > + n

[PATCH 08/22] mm/vmstat: Avoid on each online CPU loops

2016-11-26 Thread Sebastian Andrzej Siewior
Both iterations over online cpus can be replaced by the proper node specific functions. Cc: Andrew Morton Cc: Vlastimil Babka Cc: Mel Gorman Cc: Johannes Weiner Cc: linux...@kvack.org Signed-off-by: Sebastian Andrzej Siewior --- mm/vmstat.c | 14 +++--- 1 file changed, 7 insertions(+