lsmem: add support to display dynamic (de)configuration of memory
Extend lsmem to display (de)configured blocks and memmap_on_memory
state. With the new s390 kernel interface (linux-next)
ff18dcb19aab
("s390/sclp: Add support for dynamic (de)configuration of memory"),
standby memory blocks are no longer pre-added at boot, but must be
explicitly configured before being eligible for online/offline
operations. At configuration time, users can also decide whether to use
memmap-on-memory per block.
Add CONFIGURED column : indicate if a memory block has been explicitly
configured.
Add MEMMAP-ON-MEMORY column : indicate if a memory block uses
memmap-on-memory.
memmap-on-memory reference:
https://docs.kernel.org/admin-guide/mm/memory-hotplug.html
Users can now inspect memory configuration state and retrieve
memmap-on-memory state per block.
lsmem -o RANGE,SIZE,STATE,BLOCK,CONFIGURED,MEMMAP-ON-MEMORY
RANGE SIZE STATE BLOCK CONFIGURED MEMMAP-ON-MEMORY
0x00000000-0x7fffffff 2G online 0-15 yes no
0x80000000-0xffffffff 2G offline 16-31 no yes
Memory block size: 128M
Total online memory: 2G
Total offline memory: 2G
Memmap on memory parameter: yes
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>