linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Gregory Price <gourry@gourry.net>
To: "David Hildenbrand (Red Hat)" <david@kernel.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, osalvador@suse.de,
	gregkh@linuxfoundation.org, rafael@kernel.org, dakr@kernel.org,
	akpm@linux-foundation.org, lorenzo.stoakes@oracle.com,
	Liam.Howlett@oracle.com, vbabka@suse.cz, rppt@kernel.org,
	surenb@google.com, mhocko@suse.com, hare@suse.de
Subject: Re: [RFC PATCH] memory,memory_hotplug: allow restricting memory blocks to zone movable
Date: Tue, 6 Jan 2026 11:58:48 -0500	[thread overview]
Message-ID: <aV0_SMq_I_R7ikF3@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <7f053290-6b9a-4d18-936e-0f28006c79c3@kernel.org>

On Tue, Jan 06, 2026 at 04:24:21PM +0100, David Hildenbrand (Red Hat) wrote:
> > +/*
> > + * Restrict hotplugged memory blocks to ZONE_MOVABLE only.
> > + *
> > + * During offlining of hotplugged memory which was originally onlined
> > + * as ZONE_MOVABLE, userland services may detect blocks going offline
> > + * and automatically re-online them into ZONE_NORMAL or lower.  When
> > + * this happens it may become permanently incapable of being removed.
> 
> If it's really only that, we could also look into simply making a re-online
> without a specific mode ("online") to use the previous mode.
> 
> We could glue that to the "contig-zones" policy only, to not affect
> "auto-movable".
> 
> That is, remember the zone to which it was previously onlined, and then
> simply re-online to that one.
> 

I know we do this in memory_hotplug.c to rollback to prior state.

I did notice in... i think it was either memory.c or hotplug.c... that
we end up setting mem->online_type=MMOP_OFFLINE after comping an online
operation.  That seemed confusing and maybe we can use that to store the
current state.

I'm not against this idea, but it also makes the sysfs a little more
confusing (`echo online` now does different things based on prior
state).  I preferred just failing if the block wasn't compatible with
the zone (maybe making it more clear with a dmesg print?)

Anyway, let me know what your preference is, happy to pivot however.

Hopefully Hannes can add additional feedback and guidance here.

~Gregory


  reply	other threads:[~2026-01-06 16:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 20:36 Gregory Price
2026-01-06 15:05 ` Michal Hocko
2026-01-06 16:53   ` Gregory Price
2026-01-06 19:49     ` Michal Hocko
2026-01-07 12:47       ` Hannes Reinecke
2026-01-07 17:17         ` Michal Hocko
2026-01-07 15:09       ` David Hildenbrand (Red Hat)
2026-01-07 16:00         ` Gregory Price
2026-01-07 17:19         ` Michal Hocko
2026-01-06 15:24 ` David Hildenbrand (Red Hat)
2026-01-06 16:58   ` Gregory Price [this message]
2026-01-06 17:52     ` David Hildenbrand (Red Hat)
2026-01-06 18:06       ` Gregory Price
2026-01-06 18:38         ` David Hildenbrand (Red Hat)
2026-01-06 19:59           ` Gregory Price
2026-01-06 20:22             ` David Hildenbrand (Red Hat)
2026-01-08  7:31               ` Hannes Reinecke
2026-01-08 14:16                 ` David Hildenbrand (Red Hat)
2026-01-08  7:21         ` Hannes Reinecke
2026-01-08  7:22         ` Hannes Reinecke

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=aV0_SMq_I_R7ikF3@gourry-fedora-PF4VCD3F \
    --to=gourry@gourry.net \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=dakr@kernel.org \
    --cc=david@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hare@suse.de \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=rafael@kernel.org \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    /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