Re: [PATCH v2 5/5] mm, memory_hotplug: Refactor shrink_zone/pgdat_span

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-11-28 14:08, Michal Hocko wrote:
On Wed 28-11-18 13:51:42, osalvador@xxxxxxx wrote:
> yep. Or when we extend a zone/node via hotplug.
>
> > The only thing I am worried about is that by doing that, the system
> > will account spanned_pages incorrectly.
>
> As long as end_pfn - start_pfn matches then I do not see what would be
> incorrect.

If by end_pfn - start_pfn you mean zone_end_pfn - zone_start_pfn,
then we would still need to change zone_start_pfn when removing
the first section, and adjust spanned_pages in case we remove the last
section,
would not we?

Why? Again, how is removing the last/first section of the zone any
different from any other section?

Because removing last/first section changes the zone's boundary.
A zone that you removed the first section, will no longer start
at zone_start_pfn.

A quick glance points that, for example, compact_zone() relies on zone_start_pfn
to get where the zone starts.
Now, if you remove the first section and zone_start_pfn does not get adjusted, you
will get a wrong start.

Maybe that is fine, I am not sure.
Sorry for looping here, but it is being difficult for me to grasp it.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux