[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190326122522.GO28406@dhcp22.suse.cz>
Date: Tue, 26 Mar 2019 13:25:22 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
logang@...tatee.com, osalvador@...e.de, hannes@...xchg.org,
akpm@...ux-foundation.org, richard.weiyang@...il.com,
rientjes@...gle.com, zi.yan@...rutgers.edu
Subject: Re: [RFC] mm/hotplug: Make get_nid_for_pfn() work with
HAVE_ARCH_PFN_VALID
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
Powered by blists - more mailing lists