linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: osalvador <osalvador@suse.de>,
	akpm@linux-foundation.org, dave.hansen@intel.com,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm, page_alloc: fix calculation of pgdat->nr_zones
Date: Mon, 19 Nov 2018 15:23:25 +0100	[thread overview]
Message-ID: <20181119142325.GP22247@dhcp22.suse.cz> (raw)
In-Reply-To: <20181119141505.xugul3s5nbzssybm@master>

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@gmail.com>
> >
> >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.
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-11-19 14:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-17  2:20 Wei Yang
2018-11-19  6:38 ` Anshuman Khandual
2018-11-20  3:22   ` Wei Yang
2018-11-19  9:48 ` Michal Hocko
2018-11-19 13:38   ` Michal Hocko
2018-12-04  9:05     ` Sasha Levin
2018-12-04  9:11       ` Wei Yang
2018-11-19 10:07 ` osalvador
2018-11-19 10:20   ` Michal Hocko
2018-11-19 14:15   ` Wei Yang
2018-11-19 14:23     ` Michal Hocko [this message]
2018-11-19 21:44       ` Wei Yang
2018-11-19 21:47         ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181119142325.GP22247@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=richard.weiyang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox