Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1691683 > unrolled thread

Re: [PATCH 4/9] mm, memory_hotplug: drop zone from build_all_zonelists

Started byVlastimil Babka <vbabka@suse.cz>
First post2017-07-19 15:40 +0200
Last post2017-07-20 10:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 4/9] mm, memory_hotplug: drop zone from  build_all_zonelists Vlastimil Babka <vbabka@suse.cz> - 2017-07-19 15:40 +0200
    Re: [PATCH 4/9] mm, memory_hotplug: drop zone from  build_all_zonelists Michal Hocko <mhocko@kernel.org> - 2017-07-20 10:20 +0200

#1691683 — Re: [PATCH 4/9] mm, memory_hotplug: drop zone from build_all_zonelists

FromVlastimil Babka <vbabka@suse.cz>
Date2017-07-19 15:40 +0200
SubjectRe: [PATCH 4/9] mm, memory_hotplug: drop zone from build_all_zonelists
Message-ID<u4XmO-Lg-37@gated-at.bofh.it>
On 07/14/2017 10:00 AM, Michal Hocko wrote:
> From: Michal Hocko <mhocko@suse.com>
> 
> build_all_zonelists gets a zone parameter to initialize zone's
> pagesets. There is only a single user which gives a non-NULL
> zone parameter and that one doesn't really need the rest of the
> build_all_zonelists (see 6dcd73d7011b ("memory-hotplug: allocate zone's
> pcp before onlining pages")).
> 
> Therefore remove setup_zone_pageset from build_all_zonelists and call it
> from its only user directly. This will also remove a pointless zonlists
> rebuilding which is always good.
> 
> Cc: Wen Congyang <wency@cn.fujitsu.com>
> Signed-off-by: Michal Hocko <mhocko@suse.com>

Acked-by: Vlastimil Babka <vbabka@suse.cz>

with a small point below

...

> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index ebc3311555b1..00e117922b3f 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5065,7 +5065,6 @@ static void build_zonelists(pg_data_t *pgdat)
>  static void setup_pageset(struct per_cpu_pageset *p, unsigned long batch);
>  static DEFINE_PER_CPU(struct per_cpu_pageset, boot_pageset);
>  static DEFINE_PER_CPU(struct per_cpu_nodestat, boot_nodestats);
> -static void setup_zone_pageset(struct zone *zone);
>  
>  /*
>   * Global mutex to protect against size modification of zonelists
> @@ -5146,19 +5145,14 @@ build_all_zonelists_init(void)
>   * unless system_state == SYSTEM_BOOTING.
>   *
>   * __ref due to (1) call of __meminit annotated setup_zone_pageset

Isn't the whole (1) in the comment invalid now?

> - * [we're only called with non-NULL zone through __meminit paths] and
> - * (2) call of __init annotated helper build_all_zonelists_init
> + * and (2) call of __init annotated helper build_all_zonelists_init
>   * [protected by SYSTEM_BOOTING].
>   */
> -void __ref build_all_zonelists(pg_data_t *pgdat, struct zone *zone)
> +void __ref build_all_zonelists(pg_data_t *pgdat)
>  {
>  	if (system_state == SYSTEM_BOOTING) {
>  		build_all_zonelists_init();
>  	} else {
> -#ifdef CONFIG_MEMORY_HOTPLUG
> -		if (zone)
> -			setup_zone_pageset(zone);
> -#endif
>  		/* we have to stop all cpus to guarantee there is no user
>  		   of zonelist */
>  		stop_machine_cpuslocked(__build_all_zonelists, pgdat, NULL);
> @@ -5432,7 +5426,7 @@ static void __meminit zone_pageset_init(struct zone *zone, int cpu)
>  	pageset_set_high_and_batch(zone, pcp);
>  }
>  
> -static void __meminit setup_zone_pageset(struct zone *zone)
> +void __meminit setup_zone_pageset(struct zone *zone)
>  {
>  	int cpu;
>  	zone->pageset = alloc_percpu(struct per_cpu_pageset);
> 

[toc] | [next] | [standalone]


#1692539

FromMichal Hocko <mhocko@kernel.org>
Date2017-07-20 10:20 +0200
Message-ID<u5eQG-4Bm-1@gated-at.bofh.it>
In reply to#1691683
On Wed 19-07-17 15:33:32, Vlastimil Babka wrote:
> On 07/14/2017 10:00 AM, Michal Hocko wrote:
[...]
> > @@ -5146,19 +5145,14 @@ build_all_zonelists_init(void)
> >   * unless system_state == SYSTEM_BOOTING.
> >   *
> >   * __ref due to (1) call of __meminit annotated setup_zone_pageset
> 
> Isn't the whole (1) in the comment invalid now?

Yeah, I will drop it.
-- 
Michal Hocko
SUSE Labs

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web