lkml.org 
[lkml]   [2017]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] mm: consider zone which is not fully populated to have holes
On Wed 19-04-17 14:34:54, Vlastimil Babka wrote:
> On 04/19/2017 02:16 PM, Michal Hocko wrote:
> > On Wed 19-04-17 13:59:40, Vlastimil Babka wrote:
> >> On 04/18/2017 11:27 AM, Michal Hocko wrote:
> > [...]
> >>> I am not aware of any such user. PageReserved has always been about "the
> >>> core mm should touch these pages and modify their state" AFAIR.
> >>> But I believe that touching those holes just asks for problems so I
> >>> would rather have them covered.
> >>
> >> OK. I guess it's OK to use PageReserved of first pageblock page to
> >> determine if we can trust page_zone(), because the memory offline
> >> scenario should have sufficient granularity and not make holes inside
> >> pageblock?
> >
> > Yes memblocks should be section size aligned and that is 128M resp. 2GB
> > on large machines. So we are talking about much larger than page block
> > granularity here.
> >
> > Anyway, Joonsoo didn't like the the explicit PageReserved checks so I
> > have come with pfn_to_online_page which hides this implementation
> > detail. How do you like the following instead?
>
> Yeah that's OK. The other two patches will be updated as well?

yes

> Ideally we would later convert this helper to use some special values
> for zone/node id (such as -1) instead of PageReserved to indicate an
> offline node, as we discussed.

I have considered zone_id to be -1 but there is just too much code which
uses the id to translate it to the struct zone * directly and that would
lead to subtle bugs. On the other hand zone_id == 0 is not optimal but
much safer from that POV. I will think about the safest way forward long
term but my intention was to have something reasonably good for starter.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2017-04-19 14:51    [W:0.069 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site