linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Tatashin <pasha.tatashin@oracle.com>
To: osalvador@techadventures.net
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>,
	mgorman@techsingularity.net, aaron.lu@intel.com,
	iamjoonsoo.kim@lge.com,
	Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	dan.j.williams@intel.com, osalvador@suse.de
Subject: Re: [PATCH v4 4/4] mm/page_alloc: Introduce free_area_init_core_hotplug
Date: Fri, 27 Jul 2018 11:24:15 -0400	[thread overview]
Message-ID: <CAGM2reY-uUTBYUY9XhhQqm6CRWjFsH0fxJ1H7D3+-0Lbyy8HTg@mail.gmail.com> (raw)
In-Reply-To: <20180727140325.11881-5-osalvador@techadventures.net>

Hi Oscar,

>  static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)

Remove __ref from this function and add it to
free_area_init_core_hotplug() instead, as that is the only function
from a different section. This will reduce the scope of ref, and no
need to place reset_node_managed_pages() into a different section as
it is compiled only when CONFIG_MEMORY_HOTPLUG=y

> +#ifdef CONFIG_MEMORY_HOTPLUG
> +void __paginginit free_area_init_core_hotplug(int nid)
> +{
> +       enum zone_type j;
> +       pg_data_t *pgdat = NODE_DATA(nid);
> +
> +       pgdat_init_internals(pgdat);
> +       for (j = 0; j < MAX_NR_ZONES; j++) {
> +               struct zone *zone = pgdat->node_zones + j;
> +               zone_init_internals(zone, j, nid, 0);
> +       }
> +}

Style: I would write the for() loop above like this:

        for (i = 0; i < MAX_NR_ZONES; i++)
                zone_init_internals(&pgdat->node_zones[i], i, nid, 0);

Other than this all good:
Reviewed-by: Pavel Tatashin <pasha.tatashin@oracle.com>

Thank you,
Pavel

      reply	other threads:[~2018-07-27 15:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 14:03 [PATCH v4 0/4] Refactor free_area_init_core and add free_area_init_core_hotplug osalvador
2018-07-27 14:03 ` [PATCH v4 1/4] mm/page_alloc: Move ifdefery out of free_area_init_core osalvador
2018-07-27 14:03 ` [PATCH v4 2/4] mm: access zone->node via zone_to_nid() and zone_set_nid() osalvador
2018-07-27 14:03 ` [PATCH v4 3/4] mm/page_alloc: Inline function to handle CONFIG_DEFERRED_STRUCT_PAGE_INIT osalvador
2018-07-27 14:03 ` [PATCH v4 4/4] mm/page_alloc: Introduce free_area_init_core_hotplug osalvador
2018-07-27 15:24   ` Pavel Tatashin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGM2reY-uUTBYUY9XhhQqm6CRWjFsH0fxJ1H7D3+-0Lbyy8HTg@mail.gmail.com \
    --to=pasha.tatashin@oracle.com \
    --cc=aaron.lu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=osalvador@techadventures.net \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox