On Tue, Mar 25, 2014 at 08:08:48PM +0900, HATAYAMA, Daisuke wrote:
Hello,
This is an RFC patch intended to first review basic design of --split option support.
This version automatically appends --split option if more than 1 cpu is available on kdump 2nd kernel. I guess someone propably doesn't like the situation that multiple vmcores are generated implicitly without any explicit user operation. So, I'd like comments on this design first.
Hi Hatayama,
Can you give some more details about how --split feature of makedumpfile works. I have never used it. Why should I split the file into multiple files? And how to get back original single file.
Also, I don't think we should be adding --split automatically. I want to stick to user specified core collector and options and not add things silently.
If user wants to take advantage of parallelism, they need to modify nr_cpus and they need to modify core_collector line also and we should document it properly.
Also can't we take advatage of parallelism for compression and while writing compressed data write it to a single file. That way no special configuration will be required and makedumpfile should be able to fork as many threads as number of cpus, do the compression and write the output to a single file.
Thanks Vivek
Another idea is to introduce a new directive to specify the number of vmcores into which we split /proc/vmcore, and then we append --split option if and only if the directive is specified with the value more than 1 cpu.
From e6afa242829768ee0b9e58637444acf3fed4b442 Mon Sep 17 00:00:00 2001 From: HATAYAMA Daisuke d.hatayama@jp.fujitsu.com Date: Tue, 25 Mar 2014 17:09:42 +0900 Subject: [PATCH] Add --split support for dump on filesystem
This commit implement makedumpfile --split option support, allowing filtering and compression in paralell.
In this design, --split option is automatically appended if more than 1 cpu is available. Also, the number of generated dump files are automatically decided to the number of online cpus.
To support --split option for dump on network, it's necessary to add new feature in makedumpfile to make it possible to specify --split option and -F option at the same time. This is going to be done separately.
Signed-off-by: HATAYAMA Daisuke d.hatayama@jp.fujitsu.com
dracut-kdump.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh index d9e65ac..76494ab 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -88,6 +88,8 @@ dump_fs() { local _dev=$(findmnt -k -f -n -r -o SOURCE $1) local _mp=$(findmnt -k -f -n -r -o TARGET $1)
local _savedir="$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR"
local _nr_cpus=$(grep processor /proc/cpuinfo | wc -l)
echo "kdump: dump target is $_dev"
@@ -100,16 +102,23 @@ dump_fs() # Remove -F in makedumpfile case. We don't want a flat format dump here. [[ $CORE_COLLECTOR = *makedumpfile* ]] && CORE_COLLECTOR=`echo $CORE_COLLECTOR | sed -e "s/-F//g"`
- echo "kdump: saving to $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/"
echo "kdump: saving to $_savedir"
mount -o remount,rw $_mp || return 1
- mkdir -p $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR || return 1
- mkdir -p $_savedir || return 1
- save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/"
save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_savedir"
echo "kdump: saving vmcore"
- $CORE_COLLECTOR /proc/vmcore $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete || return 1
- mv $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore
if [[ $CORE_COLLECTOR = *makedumpfile* && $_nr_cpus > 1 ]] ; then
$CORE_COLLECTOR --split /proc/vmcore $(seq -s " " -f "$_savedir/vmcore-incomplete-%g" $_nr_cpus) || return 1
for i in $(seq $_nr_cpus); do
mv $_savedir/vmcore-incomplete-$i $_savedir/vmcore-$i
done
else
$CORE_COLLECTOR /proc/vmcore $_savedir/vmcore-incomplete || return 1
mv $_savedir/vmcore-incomplete $_savedir/vmcore
fi sync
echo "kdump: saving vmcore complete"
-- 1.8.5.3
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec