Re: [PATCH] mm, page_alloc: fix calculation of pgdat->nr_zones

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

 



On Mon 19-11-18 21:44:50, Wei Yang wrote:
> On Mon, Nov 19, 2018 at 03:23:25PM +0100, Michal Hocko wrote:
> >On Mon 19-11-18 14:15:05, Wei Yang wrote:
> >> On Mon, Nov 19, 2018 at 11:07:41AM +0100, osalvador wrote:
> >> >
> >> >> Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
> >> >
> >> >Good catch.
> >> >
> >> >One thing I was wondering is that if we also should re-adjust it when a
> >> >zone gets emptied during offlining memory.
> >> >I checked, and whenever we work wirh pgdat->nr_zones we seem to check
> >> >if the zone is populated in order to work with it.
> >> >But still, I wonder if we should re-adjust it.
> >> 
> >> Well, thanks all for comments. I am glad you like it.
> >> 
> >> Actually, I have another proposal or I notice another potential issue.
> >> 
> >> In case user online pages in parallel, we may face a contention and get
> >> a wrong nr_zones.
> >
> >No, this should be protected by the global mem hotplug lock. Anyway a
> >dedicated lock would be much better. I would move it under
> >pgdat_resize_lock.
> 
> This is what I think about.
> 
> Do you like me to send v2 with this change? Or you would like to add it
> by yourself?

This is independent on this patch. So feel free to send a separate
patch.
-- 
Michal Hocko
SUSE Labs




[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