]> git.baikalelectronics.ru Git - kernel.git/commit
fadump: Invalidate registration and release reserved memory for general use.
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Thu, 16 Feb 2012 01:15:08 +0000 (01:15 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 22 Feb 2012 23:50:02 +0000 (10:50 +1100)
commit141730a7a2f0e1f677092a410b9e38bb734d09ea
tree611abfdfca1a12225f4ffbac7661a80bba3c46a4
parentae2586fecef8eb08ef0d27c34aa0e9c6b1970d2c
fadump: Invalidate registration and release reserved memory for general use.

This patch introduces an sysfs interface '/sys/kernel/fadump_release_mem' to
invalidate the last fadump registration, invalidate '/proc/vmcore', release
the reserved memory for general use and re-register for future kernel dump.
Once the dump is copied to the disk, unlike phyp dump, the userspace tool
can release all the memory reserved for dump with one single operation of
echo 1 to '/sys/kernel/fadump_release_mem'.

Release the reserved memory region excluding the size of the memory required
for future kernel dump registration. And therefore, unlike kdump, Fadump
doesn't need a 2nd reboot to get back the system to the production
configuration.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/fadump.h
arch/powerpc/kernel/fadump.c