linux/drivers/s390
Michael Holzheu 8741ce6d11 s390/mm: Fix memory hotplug for unaligned standby memory
Commit 27356f54c8 ("mm/hotplug: verify hotplug memory range")
introduced a check that makes add_memory() only accept section size
aligned memory.

Therefore on z/VM systems, where standby memory is not aligned, no
standby memory is registered at all.

Example:

 #cp def store 3504M standby 2336M
 00: CP Q V STORE
 00: STORAGE = 3504M MAX = 6G INC = 8M STANDBY = 2336M RESERVED = 0

For this setup the following error message is printed:

 Section-unaligned hotplug range: start 0xdb000000, size 0x92000000

So fix this and register aligned memory in "sclp_cmd.c". This means
that for the corner cases where the standby memory is not aligned we
loose some memory.

In order to inform the user about the potential loss of standby memory,
we add a new message for each added standby block and print how
much of the standby memory is usable, for example:

 sclp_cmd.4336b4: Standby memory at 0x50000000 (256M of 256M usable)
 sclp_cmd.4336b4: Standby memory at 0xb0000000 (256M of 256M usable)
 sclp_cmd.4336b4: Standby memory at 0xdb000000 (2048M of 2336M usable)

We also ensure that a potential memory block that contains both "assigned"
and "standby" memory cannot be setup offline.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2015-04-15 12:23:49 +02:00
..
block s390/dasd: remove setting of scheduler from driver 2015-03-25 11:49:40 +01:00
char s390/mm: Fix memory hotplug for unaligned standby memory 2015-04-15 12:23:49 +02:00
cio s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
crypto s390: remove test_facility(2) (== z/Architecture mode active) checks 2015-03-25 11:49:37 +01:00
kvm virtio_ccw: finalize_features error handling 2014-12-09 21:42:06 +02:00
net s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
scsi mm, mempool: do not allow atomic resizing 2015-04-14 16:49:06 -07:00
Makefile