Re: [PATCH v2 0/7] mm/hotplug: Only use subsection map in VMEMMAP case
From: Michal Hocko
Date: Thu Feb 20 2020 - 05:38:55 EST
On Thu 20-02-20 12:33:09, Baoquan He wrote:
> Memory sub-section hotplug was added to fix the issue that nvdimm could
> be mapped at non-section aligned starting address. A subsection map is
> added into struct mem_section_usage to implement it. However, sub-section
> is only supported in VMEMMAP case.
Why? Is there any fundamental reason or just a lack of implementation?
VMEMMAP should be really only an implementation detail unless I am
missing something subtle.
> Hence there's no need to operate
> subsection map in SPARSEMEM|!VMEMMAP case. In this patchset, change
> codes to make sub-section map and the relevant operation only available
> in VMEMMAP case.
> And since sub-section hotplug added, the hot add/remove functionality
> have been broken in SPARSEMEM|!VMEMMAP case. Wei Yang and I, each of us
> make one patch to fix one of the failures. In this patchset, the patch
> 1/7 from me is used to fix the hot remove failure. Wei Yang's patch has
> been merged by Andrew.
Not sure I understand. Are there more issues to be fixed?
> include/linux/mmzone.h | 2 +
> mm/sparse.c | 178 +++++++++++++++++++++++++++++------------
> 2 files changed, 127 insertions(+), 53 deletions(-)
Why do we need to add so much code to remove a functionality from one