All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Gregory Price <gourry@gourry.net>
Cc: linux-mm@kvack.org, nvdimm@lists.linux.dev,
	linux-kernel@vger.kernel.org, kernel-team@meta.com,
	linux-cxl@vger.kernel.org, linux-kselftest@vger.kernel.org,
	djbw@kernel.org, vishal.l.verma@intel.com, dave.jiang@intel.com,
	akpm@linux-foundation.org, ljs@kernel.org, liam@infradead.org,
	vbabka@kernel.org, rppt@kernel.org, surenb@google.com,
	mhocko@suse.com, osalvador@suse.de, shuah@kernel.org,
	alison.schofield@intel.com,
	Smita.KoralahalliChannabasappa@amd.com, ira.weiny@intel.com,
	apopple@nvidia.com, Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH v4 8/9] dax/kmem: add sysfs interface for atomic hotplug
Date: Tue, 9 Jun 2026 20:22:20 +0200	[thread overview]
Message-ID: <06bcee07-5e56-4a82-95ff-2a8e75b7154d@kernel.org> (raw)
In-Reply-To: <aihZG8WKVSvA86mA@gourry-fedora-PF4VCD3F>

On 6/9/26 20:19, Gregory Price wrote:
> On Tue, Jun 09, 2026 at 08:11:42PM +0200, David Hildenbrand (Arm) wrote:
>> On 6/9/26 17:35, Gregory Price wrote:
>>>
>>> In patch 6 response i point out adding MMOP_UNPLUGGED
>>>
>>> If we add MMOP_UNPLUGGED as a state that is only use by callers of
>>> memory hotplug to represent the current state - but not as a valid input
>>> to memory_hotplug.c - then we can simply this as you request.
>>>
>>> Although we'll need to add a couple lines to memoryN/state parsing code
>>> to disallow MMOP_UNPLUGGED as a valid input (otherwise you could
>>> permanently unplug memory without the ability to get it back... unless
>>> you want that?  Seems useless to me.)
>>
>> I would just special-case your KMEM-special value, and then branch off to the
>> core helpers?
>>
>> static int dax_kmem_parse_state(const char *buf)
>> {
>> 	if (sysfs_streq(buf, "unplugged"))
>> 		return DAX_KMEM_UNPLUGGED;
>> 	return mhp_online_type_from_str(...);
>> }
>>
>> So there is no need to add a value to MM core?
>>
> 
> Was going to propose this, but then I thought... well if CXL detactes
> itself from dax and does this same pattern, maybe MMOP_UNPLUGGED makes
> sense.
> 
> But i'll leave that for another day and do as you suggest.

Let me sleep over it :)

-- 
Cheers,

David


  reply	other threads:[~2026-06-09 18:22 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05 21:19 [PATCH v4 0/9] dax/kmem: atomic whole-device hotplug via sysfs Gregory Price
2026-06-05 21:19 ` [PATCH v4 1/9] mm/memory: add memory_block_aligned_range() helper Gregory Price
2026-06-09  9:50   ` David Hildenbrand (Arm)
2026-06-05 21:19 ` [PATCH v4 2/9] mm/memory_hotplug: pass online_type to online_memory_block() via arg Gregory Price
2026-06-05 21:19 ` [PATCH v4 3/9] mm/memory_hotplug: export mhp_get_default_online_type Gregory Price
2026-06-05 21:29   ` sashiko-bot
2026-06-05 21:43     ` Gregory Price
2026-06-09  9:52   ` David Hildenbrand (Arm)
2026-06-09 15:11     ` Gregory Price
2026-06-05 21:19 ` [PATCH v4 4/9] mm/memory_hotplug: add __add_memory_driver_managed() with online_type arg Gregory Price
2026-06-09  9:55   ` David Hildenbrand (Arm)
2026-06-09 15:12     ` Gregory Price
2026-06-05 21:19 ` [PATCH v4 5/9] mm/memory_hotplug: add multi-range hotunplug Gregory Price
2026-06-05 21:30   ` sashiko-bot
2026-06-09 10:06   ` David Hildenbrand (Arm)
2026-06-09 15:15     ` Gregory Price
2026-06-05 21:19 ` [PATCH v4 6/9] dax: plumb hotplug online_type through dax Gregory Price
2026-06-05 21:31   ` sashiko-bot
2026-06-05 21:54     ` Gregory Price
2026-06-09 10:21       ` David Hildenbrand (Arm)
2026-06-09 15:33         ` Gregory Price
2026-06-05 21:19 ` [PATCH v4 7/9] dax/kmem: extract hotplug/hotremove helper functions Gregory Price
2026-06-05 21:36   ` sashiko-bot
2026-06-05 22:03     ` Gregory Price
2026-06-05 21:19 ` [PATCH v4 8/9] dax/kmem: add sysfs interface for atomic hotplug Gregory Price
2026-06-05 21:37   ` sashiko-bot
2026-06-09 10:26   ` David Hildenbrand (Arm)
2026-06-09 15:35     ` Gregory Price
2026-06-09 18:11       ` David Hildenbrand (Arm)
2026-06-09 18:19         ` Gregory Price
2026-06-09 18:22           ` David Hildenbrand (Arm) [this message]
2026-06-09 18:33             ` Gregory Price
2026-06-05 21:19 ` [PATCH v4 9/9] selftests/dax: add dax/kmem hotplug sysfs regression test Gregory Price
2026-06-05 21:34   ` sashiko-bot

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=06bcee07-5e56-4a82-95ff-2a8e75b7154d@kernel.org \
    --to=david@kernel.org \
    --cc=Smita.KoralahalliChannabasappa@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=alison.schofield@intel.com \
    --cc=apopple@nvidia.com \
    --cc=dave.jiang@intel.com \
    --cc=djbw@kernel.org \
    --cc=gourry@gourry.net \
    --cc=hare@suse.de \
    --cc=ira.weiny@intel.com \
    --cc=kernel-team@meta.com \
    --cc=liam@infradead.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=osalvador@suse.de \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=vishal.l.verma@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.