Comment 24 for bug 2028158

Revision history for this message
Michael Reed (mreed8855) wrote :

Source: https://www.kernel.org/doc/Documentation/memory-hotplug.txt

How to online memory
--------------------

When the memory is hot-added, the kernel decides whether or not to "online"
it according to the policy which can be read from "auto_online_blocks" file::

 % cat /sys/devices/system/memory/auto_online_blocks

The default depends on the CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE kernel config
option. If it is disabled the default is "offline" which means the newly added
memory is not in a ready-to-use state and you have to "online" the newly added
memory blocks manually. Automatic onlining can be requested by writing "online"
to "auto_online_blocks" file::

 % echo online > /sys/devices/system/memory/auto_online_blocks

This sets a global policy and impacts all memory blocks that will subsequently
be hotplugged.

If this is enabled by default then the following should achieve the same goal as disabling the config option:

echo offline > /sys/devices/system/memory/auto_online_blocks