Comment 21 for bug 785394

Louis Bouchard (louis) wrote :

== Test on a VM with 384Mb of memory ==

1)Original setup - crashkernel=384M-2G:64M,2G-:128M
ubuntu@SaucyS:~$ free
             total used free shared buffers cached
Mem: 306572 144412 162160 0 21900 73716
-/+ buffers/cache: 48796 257776
Swap: 1044476 0 1044476
ubuntu@SaucyS:~$ dmesg | grep crash
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.11.0-12-generic root=/dev/mapper/SaucyS--vg-root ro crashkernel=384M-2G:64M,2G-:128M console=ttyS0,115200
[ 0.000000] Reserving 64MB of memory at 288MB for crashkernel (System RAM: 384MB)

2) Proposed setup - crashkernel=384-:128M
root@SaucyS:~# free
             total used free shared buffers cached
Mem: 241036 146528 94508 0 21888 74100
-/+ buffers/cache: 50540 190496
Swap: 1044476 0 1044476
root@SaucyS:~# dmesg | grep crash
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.11.0-12-generic root=/dev/mapper/SaucyS--vg-root ro crashkernel=384M-:128M console=ttyS0,115200
[ 0.000000] Reserving 128MB of memory at 224MB for crashkernel (System RAM: 384MB)

3) Proposed setup on a 285Mb VM
cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.11.0-12-generic root=/dev/mapper/SaucyS--vg-root ro crashkernel=384M-:128M console=ttyS0,115200

part of boot log:
 * Loading crashkernel... Memory for crashkernel is not reserved
Please reserve memory by passing "crashkernel=X@Y" parameter to the kernel
Then try loading kdump kernel [fail]

= Alternative tests =

1) Forcing 128Mb reservation on 285Mb VM

root@SaucyS:~# free
             total used free shared buffers cached
Mem: 140684 125108 15576 0 7988 67296
-/+ buffers/cache: 49824 90860
Swap: 1044476 0 1044476
root@SaucyS:~# dmesg | grep crash
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.11.0-12-generic root=/dev/mapper/SaucyS--vg-root ro crashkernel=128M console=ttyS0,115200
[ 0.000000] Reserving 128MB of memory at 128MB for crashkernel (System RAM: 284MB)
[ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.11.0-12-generic root=/dev/mapper/SaucyS--vg-root ro crashkernel=128M console=ttyS0,115200

2) Forcing 128Mb reservation on 255Mb VM
root@SaucyS:~# free
             total used free shared buffers cached
Mem: 113048 99292 13756 0 6624 44132
-/+ buffers/cache: 48536 64512
Swap: 1044476 0 1044476
root@SaucyS:~# dmesg | grep crash
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.11.0-12-generic root=/dev/mapper/SaucyS--vg-root ro crashkernel=128M console=ttyS0,115200
[ 0.000000] Reserving 128MB of memory at 96MB for crashkernel (System RAM: 255MB)
[ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.11.0-12-generic root=/dev/mapper/SaucyS--vg-root ro crashkernel=128M console=ttyS0,115200

So even for a VM with 256Mb of RAM, it could boot with crashkernel=128M but I think it is safe to restrict it to 384Mb onward.