linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [-next] memory hotplug regression
Date: Wed, 31 May 2017 08:24:40 +0200	[thread overview]
Message-ID: <20170531062439.GA3853@dhcp22.suse.cz> (raw)
In-Reply-To: <20170530145501.GD4874@osiris>

On Tue 30-05-17 16:55:01, Heiko Carstens wrote:
> On Tue, May 30, 2017 at 04:32:47PM +0200, Michal Hocko wrote:
> > On Tue 30-05-17 14:37:24, Heiko Carstens wrote:
> > > On Tue, May 30, 2017 at 02:18:06PM +0200, Michal Hocko wrote:
> > > > > So ZONE_DMA ends within ZONE_NORMAL. This shouldn't be possible, unless
> > > > > this restriction is gone?
> > > > 
> > > > The patch below should help.
> > > 
> > > It does fix this specific problem, but introduces a new one:
> > > 
> > > # echo online_movable > /sys/devices/system/memory/memory16/state
> > > # cat /sys/devices/system/memory/memory16/valid_zones
> > > Movable
> > > # echo offline > /sys/devices/system/memory/memory16/state
> > > # cat /sys/devices/system/memory/memory16/valid_zones
> > >           <--- no output
> > > 
> > > Memory block 16 is the only one I onlined and offlineto ZONE_MOVABLE.
> > 
> > Could you test the this on top please?
> > ---
> > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> > index 792c098e0e5f..a26f9f8e6365 100644
> > --- a/mm/memory_hotplug.c
> > +++ b/mm/memory_hotplug.c
> > @@ -937,13 +937,18 @@ void __ref move_pfn_range_to_zone(struct zone *zone,
> >  	set_zone_contiguous(zone);
> >  }
> > 
> > +/*
> > + * Returns a default kernel memory zone for the given pfn range.
> > + * If no kernel zone covers this pfn range it will automatically go
> > + * to the ZONE_NORMAL.
> > + */
> >  struct zone *default_zone_for_pfn(int nid, unsigned long start_pfn,
> >  		unsigned long nr_pages)
> >  {
> >  	struct pglist_data *pgdat = NODE_DATA(nid);
> >  	int zid;
> > 
> > -	for (zid = 0; zid < MAX_NR_ZONES; zid++) {
> > +	for (zid = 0; zid <= ZONE_NORMAL; zid++) {
> >  		struct zone *zone = &pgdat->node_zones[zid];
> > 
> >  		if (zone_intersects(zone, start_pfn, nr_pages))
> 
> Still broken, but in different way(s):
> 
> # cat /sys/devices/system/memory/memory16/valid_zones
> Normal Movable
> # echo online_movable > /sys/devices/system/memory/memory16/state
> # cat /sys/devices/system/memory/memory16/valid_zones
> Movable
> # cat /sys/devices/system/memory/memory18/valid_zones
> Movable
> # echo online > /sys/devices/system/memory/memory18/state
> # cat /sys/devices/system/memory/memory18/valid_zones
> Normal    <--- should be Movable
> # cat /sys/devices/system/memory/memory17/valid_zones
>           <--- no output

OK, so this is an independent problem and an unrelated one to the
patch I've posted. We need two patches actually. Damn, I hate
MMOP_ONLINE_KEEP. I will send 2 patches as a reply to this email.

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2017-05-31  6:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24  8:20 Heiko Carstens
2017-05-24  8:39 ` Michal Hocko
2017-05-26 12:25   ` Heiko Carstens
2017-05-29  8:52     ` Michal Hocko
2017-05-29 10:11       ` Heiko Carstens
2017-05-29 10:45         ` Michal Hocko
2017-05-30 12:18     ` Michal Hocko
2017-05-30 12:37       ` Heiko Carstens
2017-05-30 14:32         ` Michal Hocko
2017-05-30 14:55           ` Heiko Carstens
2017-05-30 15:04             ` Michal Hocko
2017-05-31  6:24             ` Michal Hocko [this message]
2017-05-31  6:25               ` [PATCH 1/2] mm, memory_hotplug: fix MMOP_ONLINE_KEEP behavior Michal Hocko
2017-05-31  6:26               ` [PATCH 2/2] mm, memory_hotplug: do not assume ZONE_NORMAL is default kernel zone Michal Hocko
2017-06-01  6:49               ` [-next] memory hotplug regression Heiko Carstens
2017-06-01  7:13                 ` 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=20170531062439.GA3853@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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