On 2026-10-22 15:00 -0700, Alison Schofield wrote: > On Thu, Oct 22, 2026 at 12:46:40PM -0400, Gregory Price (Meta) wrote: > > On 2026-10-21 19:20 -0700, Alison Schofield wrote: > > > On Fri, Oct 16, 2026 at 05:42:45PM -0400, Gregory Price (Meta) wrote: > > The only scenario I could come up with is having two versions of daxctl > > fight with each other (old - no awareness of dax/state, new - uses > > dax/state) but is this a real concern? > > My concern isn't about 2 version of daxctl fighting. It's about > preserving the documented behavior for "daxctl offline-memory". And just > generally, if there is no need to change it, rather not change it. > > From the daxctl offline-memory man page: > If all blocks were already offline, print a message and return success > without actually doing anything. > > It seems the benefit of atomic unplug is w "daxctl reconfigure-device" > path where memory needs to be removed before unbinding dax_kmem. Could > we limit atomic unplug to that path? > > To be clear, I don't know if that (limiting) is doable and I also don't > know if any current user would care either way. I'm just defending the > documentated behavior (FWIW). >
hm, maybe instead: daxctl offline-memory - stays exactly as-is daxctl unplug-memory - does the unplug daxctl reconfigure-device - converts to unplug-memory under the hood userland that is suffering from these races can update their scripts from offline-memory to unplug-memory, but if they're getting it from reconfigure-device, they get it for free. Unfortunately this is the painful result of `offline` having been the default hotplug state when dax/kmem gets probed, instead of `unplugged`. So we're a bit stuck with the `offline -> unplugged -> online` pattern. The intent here was to try to get drivers creating dax/kmem to actively set a default and effectively deprecate the global hotplug auto-online setting (because a single auto-online setting for all devices does not make much sense). I intended to follow up the series with a CXL build parameter that lets a system owner set the default, but omit "offline" and instead make them choose between unplugged and some form of online. I think that resolves the daxctl problem entirely more or less? -- ~Gregory
