All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	logang@deltatee.com, osalvador@suse.de, hannes@cmpxchg.org,
	akpm@linux-foundation.org, richard.weiyang@gmail.com,
	rientjes@google.com, zi.yan@cs.rutgers.edu
Subject: Re: [RFC] mm/hotplug: Make get_nid_for_pfn() work with HAVE_ARCH_PFN_VALID
Date: Tue, 26 Mar 2019 13:25:22 +0100	[thread overview]
Message-ID: <20190326122522.GO28406@dhcp22.suse.cz> (raw)
In-Reply-To: <65a4b160-a654-8bd3-8022-491094cf6b8f@arm.com>

On Tue 26-03-19 17:33:19, Anshuman Khandual wrote:
[...]
> I could get it working with the following re-order of memblock_[free|remove] and
> arch_remove_memory(). I did not observe any other adverse side affect because of
> this change. Does it look okay ?

Memblock should only work with physical memory ranges without touching
struct pages so this should be safe. But you should double check of
course.

> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -1863,11 +1863,11 @@ void __ref __remove_memory(int nid, u64 start, u64 size)
>  
>         /* remove memmap entry */
>         firmware_map_remove(start, start + size, "System RAM");
> +       arch_remove_memory(nid, start, size, NULL);
> +
>         memblock_free(start, size);
>         memblock_remove(start, size);
>  
> -       arch_remove_memory(nid, start, size, NULL);
> -
>         try_offline_node(nid);
>  
>         mem_hotplug_done();

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2019-03-26 12:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21  8:08 [RFC] mm/hotplug: Make get_nid_for_pfn() work with HAVE_ARCH_PFN_VALID Anshuman Khandual
2019-03-21  8:36 ` Michal Hocko
2019-03-22  6:19   ` Anshuman Khandual
2019-03-22 12:02     ` Michal Hocko
2019-03-26 12:03       ` Anshuman Khandual
2019-03-26 12:25         ` Michal Hocko [this message]
2019-03-21 10:37 ` Oscar Salvador
2019-03-22  6:45   ` Anshuman Khandual

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=20190326122522.GO28406@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=logang@deltatee.com \
    --cc=osalvador@suse.de \
    --cc=richard.weiyang@gmail.com \
    --cc=rientjes@google.com \
    --cc=zi.yan@cs.rutgers.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.