[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200228072536.GK24216@MiWiFi-R3L-srv>
Date: Fri, 28 Feb 2020 15:25:36 +0800
From: Baoquan He <bhe@...hat.com>
To: Michal Hocko <mhocko@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
akpm@...ux-foundation.org, richardw.yang@...ux.intel.com,
david@...hat.com, osalvador@...e.de, dan.j.williams@...el.com,
rppt@...ux.ibm.com, robin.murphy@....com
Subject: Re: [PATCH v2 4/7] mm/sparse.c: only use subsection map in VMEMMAP
case
On 02/26/20 at 10:10am, Michal Hocko wrote:
> On Wed 26-02-20 11:53:36, Baoquan He wrote:
> > 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.
>
> An explicit note about check_pfn_span gating the proper alignement and
> sizing sounds sufficient to me.
It's fine to me, I will adjust the description.
Powered by blists - more mailing lists