1DAXCTL-RECONFIGURE-DEVICE(1)     daxctl Manual    DAXCTL-RECONFIGURE-DEVICE(1)
2
3
4

NAME

6       daxctl-reconfigure-device - Reconfigure a dax device into a different
7       mode
8

SYNOPSIS

10       daxctl reconfigure-device <dax0.0> [<dax1.0>...<daxY.Z>] [<options>]
11

EXAMPLES

13       ·   Reconfigure dax0.0 to system-ram mode, don’t online the memory
14
15           # daxctl reconfigure-device --mode=system-ram --no-online dax0.0
16           [
17             {
18               "chardev":"dax0.0",
19               "size":16777216000,
20               "target_node":2,
21               "mode":"system-ram"
22             }
23           ]
24
25       ·   Reconfigure dax0.0 to devdax mode, attempt to offline the memory
26
27           # daxctl reconfigure-device --human --mode=devdax --force dax0.0
28           {
29             "chardev":"dax0.0",
30             "size":"15.63 GiB (16.78 GB)",
31             "target_node":2,
32             "mode":"devdax"
33           }
34
35       ·   Reconfigure all dax devices on region0 to system-ram mode
36
37           # daxctl reconfigure-device --mode=system-ram --region=0 all
38           [
39             {
40               "chardev":"dax0.0",
41               "size":16777216000,
42               "target_node":2,
43               "mode":"system-ram"
44             },
45             {
46               "chardev":"dax0.1",
47               "size":16777216000,
48               "target_node":3,
49               "mode":"system-ram"
50             }
51           ]
52
53       ·   Run a process called some-service using numactl to restrict its cpu
54           nodes to 0 and 1, and  memory allocations to node 2 (determined
55           using daxctl_dev_get_target_node() or daxctl list)
56
57           # daxctl reconfigure-device --mode=system-ram dax0.0
58           [
59             {
60               "chardev":"dax0.0",
61               "size":16777216000,
62               "target_node":2,
63               "mode":"system-ram"
64             }
65           ]
66
67           # numactl --cpunodebind=0-1 --membind=2 -- some-service --opt1 --opt2
68

DESCRIPTION

70       Reconfigure the operational mode of a dax device. This can be used to
71       convert a regular devdax mode device to the system-ram mode which
72       arranges for the dax range to be hot-plugged into the system as regular
73       memory.
74
75           Note
76           This is a destructive operation. Any data on the dax device will be
77           lost.
78
79           Note
80           Device reconfiguration depends on the dax-bus device model. See
81           daxctl-migrate-device-model(1) for more information. If dax-class
82           is in use (via the dax_pmem_compat driver), the reconfiguration
83           will fail with an error such as the following:
84
85           # daxctl reconfigure-device --mode=system-ram --region=0 all
86           libdaxctl: daxctl_dev_disable: dax3.0: error: device model is dax-class
87           dax3.0: disable failed: Operation not supported
88           error reconfiguring devices: Operation not supported
89           reconfigured 0 devices
90
91       daxctl-reconfigure-device nominally expects that it will online new
92       memory blocks as movable, so that kernel data doesn’t make it into this
93       memory. However, there are other potential agents that may be
94       configured to automatically online new hot-plugged memory as it
95       appears. Most notably, these are the
96       /sys/devices/system/memory/auto_online_blocks configuration, or system
97       udev rules. If such an agent races to online memory sections, daxctl
98       checks if the blocks were onlined as movable memory. If this was not
99       the case, and the memory blocks are found to be in a different zone,
100       then a warning is displayed. If it is desired that a different agent
101       control the onlining of memory blocks, and the associated memory zone,
102       then it is recommended to use the --no-online option described below.
103       This will abridge the device reconfiguration operation to just
104       hotplugging the memory, and refrain from then onlining it.
105

OPTIONS

107       -r, --region=
108           Restrict the operation to devices belonging to the specified
109           region(s). A device-dax region is a contiguous range of memory that
110           hosts one or more /dev/daxX.Y devices, where X is the region id and
111           Y is the device instance id.
112
113       -m, --mode=
114           Specify the mode to which the dax device(s) should be reconfigured.
115
116           ·   "system-ram": hotplug the device into system memory.
117
118           ·   "devdax": switch to the normal "device dax" mode. This requires
119               the kernel to support hot-unplugging kmem based memory. If this
120               is not available, a reboot is the only way to switch back to
121               devdax mode.
122
123       -N, --no-online
124           By default, memory sections provided by system-ram devices will be
125           brought online automatically and immediately with the
126           online_movable policy. Use this option to disable the automatic
127           onlining behavior.
128
129       --no-movable
130           --movable is the default. This can be overridden to online new
131           memory such that is is not movable. This allows any allocation to
132           potentially be served from this memory. This may preclude
133           subsequent removal. With the --movable behavior (which is default),
134           kernel allocations will not consider this memory, and it will be
135           reserved for application use.
136
137       -f, --force
138           When converting from "system-ram" mode to "devdax", it is expected
139           that all the memory sections are first made offline. By default,
140           daxctl won’t touch online memory. However with this option, attempt
141           to offline the memory on the NUMA node associated with the dax
142           device before converting it back to "devdax" mode.
143
144       -u, --human
145           By default the command will output machine-friendly raw-integer
146           data. Instead, with this flag, numbers representing storage size
147           will be formatted as human readable strings with units, other
148           fields are converted to hexadecimal strings.
149
150       -v, --verbose
151           Emit more debug messages
152
154       Copyright (c) 2016 - 2019, Intel Corporation. License GPLv2: GNU GPL
155       version 2 <http://gnu.org/licenses/gpl.html>. This  is  free  software:
156       you  are  free  to change and redistribute it. There is NO WARRANTY, to
157       the extent permitted by law.
158

SEE ALSO

160       daxctl-list(1),daxctl-migrate-device-model[1]
161
162
163
164daxctl                            2019-10-28      DAXCTL-RECONFIGURE-DEVICE(1)
Impressum