Comment 1 for bug 1731937

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2017-11-13 09:48 EDT-------
The patches are now upstream, after the 2.31 release, so they will be in 2.32.
Canonical probably can not wait until 2.32, but the following commits should apply on top of 2.31.

Currently 2.31 is available here :
https://www.kernel.org/pub/linux/utils/util-linux/v2.31/

Following patches could be applied.

https://github.com/karelzak/util-linux/commit/60a7e9e94e49215b1e6ac6e33b69c3bd0a426b5e
commit 60a7e9e94e49215b1e6ac6e33b69c3bd0a426b5e
Author: Gerald Schaefer <email address hidden>
Date: Wed Sep 27 19:44:44 2017 +0200

lsmem/chmem: add memory zone awareness

With this patch, valid memory zones can be shown with lsmem, and chmem can
set memory online/offline in a specific memory zone, if allowed by the
kernel. The valid memory zones are read from the "valid_zones" sysfs
attribute, and setting memory online to a specific zone is done by
echoing "online_kernel" or "online_movable" to the "state" sysfs
attribute, in addition to the previous "online".

This patch also changes the default behavior of chmem, when setting memory
online without specifying a memory zone. If valid, memory will be set
online to the zone Movable. This zone is preferable for memory hotplug, as
it makes memory offline much more likely to succeed.

Signed-off-by: Gerald Schaefer <email address hidden>

https://github.com/karelzak/util-linux/commit/0a4320f5e785e82337c3a657c55651004e3fd08d
commit 0a4320f5e785e82337c3a657c55651004e3fd08d
Author: Gerald Schaefer <email address hidden>
Date: Wed Sep 27 19:44:45 2017 +0200

tests/lsmem: update lsmem test with ZONES column

The existing s390 and x86_64 dumps already contain the valid_zones sysfs
attribute, so just add a new "lsmem -o +ZONES" test command and update
the expected results.

Signed-off-by: Gerald Schaefer <email address hidden>

https://github.com/karelzak/util-linux/commit/afee3f204247fbc8e4cfaa1698f3d98762544dd8
commit afee3f204247fbc8e4cfaa1698f3d98762544dd8
Author: Andre Wild <email address hidden>
Date: Wed Sep 27 19:44:46 2017 +0200

lsmem/chmem: add memory zone awareness to bash-completion

This patch extends the valid --output values with ZONES for the
lsmem bash-completion, and adds the --zone option for the chmem
bash-completion.

Signed-off-by: Andre Wild <email address hidden>
Signed-off-by: Gerald Schaefer <email address hidden>