From: Gregory Price <[email protected]> Document that online-memory and offline-memory use daxX.Y/state where available, that offlining always removes the memory blocks and how that affects reconfigure-device, and the 'hotplug_state' attribute of 'daxctl list'.
Signed-off-by: Gregory Price <[email protected]> --- Documentation/daxctl/daxctl-list.txt | 5 +++++ Documentation/daxctl/daxctl-offline-memory.txt | 5 +++++ Documentation/daxctl/daxctl-online-memory.txt | 5 +++++ Documentation/daxctl/daxctl-reconfigure-device.txt | 5 ++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Documentation/daxctl/daxctl-list.txt b/Documentation/daxctl/daxctl-list.txt index 5a6a98e..a2d0ede 100644 --- a/Documentation/daxctl/daxctl-list.txt +++ b/Documentation/daxctl/daxctl-list.txt @@ -22,6 +22,11 @@ list' with no options is equivalent to: [verse] daxctl list --devices +On kernels that support atomic whole-device hotplug, 'hotplug_state' +reports /sys/bus/dax/devices/daxX.Y/state for system-ram devices, or +'inconsistent' if the device's memory blocks disagree with it (e.g. +after blocks were onlined or offlined individually). + EXAMPLE ------- ---- diff --git a/Documentation/daxctl/daxctl-offline-memory.txt b/Documentation/daxctl/daxctl-offline-memory.txt index ba06287..61a4301 100644 --- a/Documentation/daxctl/daxctl-offline-memory.txt +++ b/Documentation/daxctl/daxctl-offline-memory.txt @@ -41,6 +41,11 @@ to the system-ram mode. If one or more blocks are already offline, attempt to offline the remaining blocks. If all blocks were already offline, print a message and return success without actually doing anything. +If the kernel supports atomic whole-device hotplug +(/sys/bus/dax/devices/daxX.Y/state), the device is instead unplugged, +even if its memory is already offline: the memory is offlined and +removed in one atomic operation. 'daxctl-online-memory' restores it. + This is complementary to the 'daxctl-online-memory' command, and may be used when it is wished to offline the memory sections, but not convert the device back to 'devdax' mode. diff --git a/Documentation/daxctl/daxctl-online-memory.txt b/Documentation/daxctl/daxctl-online-memory.txt index 08b45cc..adc8517 100644 --- a/Documentation/daxctl/daxctl-online-memory.txt +++ b/Documentation/daxctl/daxctl-online-memory.txt @@ -48,6 +48,11 @@ Online the memory sections associated with a device that has been converted to the system-ram mode. If one or more blocks are already online, print a message about them, and attempt to online the remaining blocks. +If the kernel supports atomic whole-device hotplug +(/sys/bus/dax/devices/daxX.Y/state), a fully offline device is onlined +as a whole rather than block by block. An 'unplugged' device is re-added +and onlined atomically; one with blocks present is unplugged first. + This is complementary to the 'daxctl-reconfigure-device' command, when used with the '--no-online' option to skip onlining memory sections immediately after the reconfigure. In these scenarios, the memory can be onlined at a later time using diff --git a/Documentation/daxctl/daxctl-reconfigure-device.txt b/Documentation/daxctl/daxctl-reconfigure-device.txt index 9c3922d..d2b5bbf 100644 --- a/Documentation/daxctl/daxctl-reconfigure-device.txt +++ b/Documentation/daxctl/daxctl-reconfigure-device.txt @@ -230,6 +230,8 @@ include::region-option.txt[] By default, memory sections provided by system-ram devices will be brought online automatically and immediately with the 'online_movable' policy. Use this option to disable the automatic onlining behavior. + A device unplugged by 'daxctl-offline-memory' has no memory blocks + to online; use 'daxctl-online-memory' to restore them. -C:: --check-config:: @@ -248,7 +250,8 @@ include::movable-options.txt[] that all the memory sections are first made offline. By default, daxctl won't touch online memory. However with this option, attempt to offline the memory on the NUMA node associated with the dax device - before converting it back to "devdax" mode. + before converting it back to "devdax" mode. This uses + 'daxctl-offline-memory', so the device is unplugged where supported. - Additionally, if a kernel policy to auto-online blocks is detected, reconfiguration to system-ram fails. With this option, the failure can -- 2.53.0-Meta
