summaryrefslogtreecommitdiff
path: root/kernel/utsname.c
diff options
context:
space:
mode:
authorGregory Price <gourry@gourry.net>2026-07-12 11:45:04 -0400
committerAndrew Morton <akpm@linux-foundation.org>2026-07-25 21:50:31 -0700
commit3de701924862ca5d80c99a3d04872a3296c07b01 (patch)
tree53736d51c4caefba11a65fe8566bee6d8c4b7ba2 /kernel/utsname.c
parentbddb7481c2fed08e749b11057bb67470f403f567 (diff)
downloadlinux-next-3de701924862ca5d80c99a3d04872a3296c07b01.tar.gz
linux-next-3de701924862ca5d80c99a3d04872a3296c07b01.zip
selftests/dax: add dax/kmem hotplug sysfs regression test
Add a kselftest for the dax/kmem whole-device "state" sysfs attribute (/sys/bus/dax/devices/daxX.Y/state), which transitions a kmem-backed dax device between "unplugged", "online" and "online_movable". The kselftest also includes a test to demonstrate the force-unbind does not deadlock - but this is destructive (the dax device can never be rebound), so it only runs when DAX_KMEM_TEST_UNBIND=1 is set. Provisioning a devdax device and binding it to kmem needs daxctl/ndctl out of scope for an in-tree selftest. As the test mutates a device's memory, the operator opts in by naming it in DAX_KMEM_TEST_DEV (or "auto" to pick the first kmem-bound device); it SKIPs when unset, when no device is present, or when the memory cannot be freed to a baseline. When a device is available it validates the interface contract: - online / online_movable actually add memory (MemTotal grows), - online is idempotent, - switching between online types without unplug is rejected, - unplug removes memory and the reported state is "unplugged" - invalid input is rejected, - unplug and unbind tolerate blocks toggled out-of-band through the per-block memoryX/state interface. One specific regression test: online -> unplug -> online_movable -> unplug Re-online must re-reserve per-range resources so subsequent unplug actually offlines and removes instead of silently reporting success while the memory stays online. Link: https://lore.kernel.org/20260712154505.3564379-11-gourry@gourry.net Signed-off-by: Gregory Price <gourry@gourry.net> Cc: Alison Schofield <alison.schofield@intel.com> Cc: Danilo Krummrich <dakr@kernel.org> Cc: Dave Jiang <dave.jiang@intel.com> Cc: David Hildenbrand (Arm) <david@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Hannes Reinecke <hare@suse.de> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Oscar Salvador <osalvador@suse.de> Cc: Pankaj Gupta <pankaj.gupta@amd.com> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vishal Verma <vishal.l.verma@intel.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/utsname.c')
0 files changed, 0 insertions, 0 deletions