lkml.org 
[lkml]   [2018]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [v4 5/6] mm/memory_hotplug: don't read nid from struct page during hotplug

    * Pavel Tatashin <pasha.tatashin@oracle.com> wrote:

    > During memory hotplugging the probe routine will leave struct pages
    > uninitialized, the same as it is currently done during boot. Therefore, we
    > do not want to access the inside of struct pages before
    > __init_single_page() is called during onlining.
    >
    > Because during hotplug we know that pages in one memory block belong to
    > the same numa node, we can skip the checking. We should keep checking for
    > the boot case.
    >
    > Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
    > ---
    > drivers/base/memory.c | 2 +-
    > drivers/base/node.c | 22 +++++++++++++++-------
    > include/linux/node.h | 4 ++--
    > 3 files changed, 18 insertions(+), 10 deletions(-)
    >
    > diff --git a/drivers/base/memory.c b/drivers/base/memory.c
    > index deb3f029b451..a14fb0cd424a 100644
    > --- a/drivers/base/memory.c
    > +++ b/drivers/base/memory.c
    > @@ -731,7 +731,7 @@ int register_new_memory(int nid, struct mem_section *section)
    > }
    >
    > if (mem->section_count == sections_per_block)
    > - ret = register_mem_sect_under_node(mem, nid);
    > + ret = register_mem_sect_under_node(mem, nid, false);
    > out:

    The namespace of all these memory range handling functions is horribly random,
    and I think now it got worse: we add an assumption that register_new_memory() is
    implicitly called as part of hotplugged memory (where things are pre-cleared) -
    but nothing in its naming suggests so.

    How about renaming it to hotplug_memory_register() or so?

    With that change you can add:

    Reviewed-by: Ingo Molnar <mingo@kernel.org>

    Thanks,

    Ingo

    \
     
     \ /
      Last update: 2018-02-16 10:20    [W:4.038 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site