lkml.org 
[lkml]   [2020]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/7] mm/sparse.c: only use subsection map in VMEMMAP case
On 02/25/20 at 10:57am, Michal Hocko wrote:
> On Thu 20-02-20 12:33:13, Baoquan He wrote:
> > Currently, subsection map is used when SPARSEMEM is enabled, including
> > VMEMMAP case and !VMEMMAP case. However, subsection hotplug is not
> > supported at all in SPARSEMEM|!VMEMMAP case, subsection map is unnecessary
> > and misleading. Let's adjust code to only allow subsection map being
> > used in VMEMMAP case.
>
> This really needs more explanation I believe. What exactly happens if
> somebody tries to hotremove a part of the section with !VMEMMAP? I can
> see that clear_subsection_map returns 0 but that is not an error code.
> Besides that section_deactivate doesn't propagate the error upwards.
> /me stares into the code
>
> OK, I can see it now. It is relying on check_pfn_span to use the proper
> subsection granularity. This really begs for a comment in the code
> somewhere.

Yes, check_pfn_span() guards it. People have no way to hot add/remove
on non-section aligned block with !VMEMMAP.

I have added extra comment to above section_activate() to note this,
please check patch 5/7. Let me see how to add words to reflect the
check_pfn_span() guard thing.

\
 
 \ /
  Last update: 2020-02-26 04:55    [W:1.716 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site