using a git forge
by Dusty Mabe
Hi all,
I'm looking at possibly creating a patch for kexec-tools. Sending patches to the mailing
list is something I don't do very often and will probably make mistakes. I'm spoiled by
the git forge "pull request" workflow. Is this community considering moving to any git
forge that will allow PRs from casual users/contributors?
Thanks!
Dusty
1 year, 6 months
[PATCH 1/2] fix a calculation error in get_system_size
by Coiby Xu
Recently, it's found 'kdumpctl estimate' returns 512M while the system
reserves 1024M kdump memory in a case. This happens because the ranges
in /proc/iomem are inclusively. For example, "0-1: System RAM" means 2
bytes of system memory other than 1 byte. Fix this error by adding one
more byte.
Note some documentations are added as well.
Reported-by: Ruowen Qin <ruqin(a)redhat.com>
Fixes: 1813189 ("kdump-lib.sh: introduce functions to return recommened mem size")
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
kdump-lib.sh | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh
index 557eff6..f34f477 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -788,19 +788,26 @@ prepare_cmdline()
echo "$cmdline"
}
-#get system memory size in the unit of GB
+#get system memory size i.e. memblock.memory.total_size in the unit of GB
get_system_size()
{
result=$(grep "System RAM" /proc/iomem | awk -F ":" '{ print $1 }' | tr "[:lower:]" "[:upper:]" | paste -sd+)
result="+$result"
# replace '-' with '+0x' and '+' with '-0x'
- sum=$(echo "$result" | sed -e 's/-/K0x/g' -e 's/+/-0x/g' -e 's/K/+/g')
+ sum=$(echo "$result" | sed -e 's/-/K0x/g' -e 's/+/-0x/g' -e 's/K/+01+/g')
size=$(printf "%d\n" $((sum)))
size=$((size / 1024 / 1024 / 1024))
echo "$size"
}
+# Return the memory size given the system memory size and
+# crashkernel=range1:size1[,range2:size2,…].
+#
+# This functions is expected to be consisteng with the reserve_crashkernel() in
+# kernel.
+#
+# Note the ranges of crashkernel should be in increasing order.
get_recommend_size()
{
local mem_size=$1
--
2.35.1
1 year, 6 months
[PATCHv2] spec: Use zlib/dfltcc as default to improve compression speed and ratio on s390x
by Pingfan Liu
s390x implements zlib/dfltcc dedicated instruction to improve
compression speed and ratio. Switching from 'makedumpfile -l' to
'makedumpfile -c' to benifit from this feature.
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
v1 -> v2:
move 'sed' from %post to %build section
kexec-tools.spec | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kexec-tools.spec b/kexec-tools.spec
index 6673000..1c4c0cf 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -144,6 +144,12 @@ autoreconf
%endif
--sbindir=/usr/sbin
rm -f kexec-tools.spec.in
+
+# s390 uses zlib/dfltcc as default to improve compression speed and ratio
+%ifarch s390x
+sed -i 's/makedumpfile -l/makedumpfile -c/' %{SOURCE8}
+%endif
+
# setup the docs
cp %{SOURCE10} .
cp %{SOURCE11} .
--
2.31.1
1 year, 6 months
[PATCH] sysconfig: use a simple template to maintain
by Kairui Song
From: Kairui Song <kasong(a)tencent.com>
These kdump.sysconfig.* files are almost identical with a bit different
in several parameters, just use a simple script to generate them upon
packaging. This should make it easier to maintain, updating a comment or
param for certain arch can be done in one place.
There are some minor differences with the generated version due to some
arch's sysconfig is not up-to-dated, this actually fixed the issues,
to check these differences:
# for arch in aarch64 i386 ppc64 ppc64le s390x x86_64; do
./kdump-gen-sysconfig.sh kdump.sysconfig.template $arch > kdump.sysconfig.$arch.new
git checkout HEAD^ kdump.sysconfig.$arch &>/dev/null
echo "Diff of arch $arch:"
diff kdump.sysconfig.$arch kdump.sysconfig.$arch.new; echo ""
done; git reset;
Diff of arch aarch64:
> #What is the images extension. Relocatable kernels don't have one
> KDUMP_IMG_EXT=""
Diff of arch i386:
Diff of arch ppc64:
42,43d41
< #Specify the action after failure
<
Diff of arch ppc64le:
42,43d41
< #Specify the action after failure
<
Diff of arch s390x:
26,28d25
< # Any additional /sbin/mkdumprd arguments required.
< MKDUMPRD_ARGS=""
<
Diff of arch x86_64:
Signed-off-by: Kairui Song <kasong(a)tencent.com>
---
kdump-gen-sysconfig.sh | 51 ++++++++++++++++++
kdump.sysconfig.aarch64 | 53 ------------------
kdump.sysconfig.i386 | 56 -------------------
kdump.sysconfig.ppc64 | 58 --------------------
kdump.sysconfig.ppc64le | 58 --------------------
kdump.sysconfig.s390x | 59 ---------------------
kdump.sysconfig => kdump.sysconfig.template | 3 ++
kdump.sysconfig.x86_64 | 56 -------------------
kexec-tools.spec | 18 +++----
9 files changed, 60 insertions(+), 352 deletions(-)
create mode 100755 kdump-gen-sysconfig.sh
delete mode 100644 kdump.sysconfig.aarch64
delete mode 100644 kdump.sysconfig.i386
delete mode 100644 kdump.sysconfig.ppc64
delete mode 100644 kdump.sysconfig.ppc64le
delete mode 100644 kdump.sysconfig.s390x
rename kdump.sysconfig => kdump.sysconfig.template (96%)
delete mode 100644 kdump.sysconfig.x86_64
diff --git a/kdump-gen-sysconfig.sh b/kdump-gen-sysconfig.sh
new file mode 100755
index 0000000..1eac80d
--- /dev/null
+++ b/kdump-gen-sysconfig.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+TEMPLATE=$1
+ARCH=$2
+SED_EXP=""
+
+update_param()
+{
+ SED_EXP="${SED_EXP}s/^$1=.*$/$1=\"$2\"/;"
+}
+
+case "$ARCH" in
+aarch64)
+ update_param KEXEC_ARGS "-s"
+ update_param KDUMP_COMMANDLINE_APPEND \
+ "irqpoll nr_cpus=1 reset_devices cgroup_disable=memory udev.children-max=2 panic=10 swiotlb=noforce novmcoredd cma=0 hugetlb_cma=0"
+ ;;
+i386)
+ update_param KDUMP_COMMANDLINE_APPEND \
+ "irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd cma=0 hugetlb_cma=0"
+ ;;
+ppc64)
+ update_param KDUMP_COMMANDLINE_REMOVE \
+ "hugepages hugepagesz slub_debug quiet log_buf_len swiotlb hugetlb_cma"
+ update_param KDUMP_COMMANDLINE_APPEND \
+ "irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0"
+ update_param KEXEC_ARGS "--dt-no-old-root"
+ ;;
+ppc64le)
+ update_param KDUMP_COMMANDLINE_REMOVE \
+ "hugepages hugepagesz slub_debug quiet log_buf_len swiotlb hugetlb_cma"
+ update_param KDUMP_COMMANDLINE_APPEND \
+ "irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0"
+ update_param KEXEC_ARGS "--dt-no-old-root -s"
+ ;;
+s390x)
+ update_param KDUMP_COMMANDLINE_REMOVE \
+ "hugepages hugepagesz slub_debug quiet log_buf_len swiotlb vmcp_cma cma hugetlb_cma prot_virt"
+ update_param KDUMP_COMMANDLINE_APPEND \
+ "nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd vmcp_cma=0 cma=0 hugetlb_cma=0"
+ update_param KEXEC_ARGS "-s"
+ ;;
+x86_64)
+ update_param KDUMP_COMMANDLINE_APPEND \
+ "irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 acpi_no_memhotplug transparent_hugepage=never nokaslr hest_disable novmcoredd cma=0 hugetlb_cma=0"
+ update_param KEXEC_ARGS \
+ "-s"
+ ;;
+esac
+
+sed "$SED_EXP" "$TEMPLATE"
diff --git a/kdump.sysconfig.aarch64 b/kdump.sysconfig.aarch64
deleted file mode 100644
index 67a2af7..0000000
--- a/kdump.sysconfig.aarch64
+++ /dev/null
@@ -1,53 +0,0 @@
-# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
-# If no version is specified, then the init script will try to find a
-# kdump kernel with the same version number as the running kernel.
-KDUMP_KERNELVER=""
-
-# The kdump commandline is the command line that needs to be passed off to
-# the kdump kernel. This will likely match the contents of the grub kernel
-# line. For example:
-# KDUMP_COMMANDLINE="ro root=LABEL=/"
-# Dracut depends on proper root= options, so please make sure that appropriate
-# root= options are copied from /proc/cmdline. In general it is best to append
-# command line options using "KDUMP_COMMANDLINE_APPEND=".
-# If a command line is not specified, the default will be taken from
-# /proc/cmdline
-KDUMP_COMMANDLINE=""
-
-# This variable lets us remove arguments from the current kdump commandline
-# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-# NOTE: some arguments such as crashkernel will always be removed
-KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swiotlb cma hugetlb_cma"
-
-# This variable lets us append arguments to the current kdump commandline
-# after processed by KDUMP_COMMANDLINE_REMOVE
-KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory udev.children-max=2 panic=10 swiotlb=noforce novmcoredd cma=0 hugetlb_cma=0"
-
-# Any additional kexec arguments required. In most situations, this should
-# be left empty
-#
-# Example:
-# KEXEC_ARGS="--elf32-core-headers"
-KEXEC_ARGS="-s"
-
-#Where to find the boot image
-#KDUMP_BOOTDIR="/boot"
-
-#What is the image type used for kdump
-KDUMP_IMG="vmlinuz"
-
-# Logging is controlled by following variables in the first kernel:
-# - @var KDUMP_STDLOGLVL - logging level to standard error (console output)
-# - @var KDUMP_SYSLOGLVL - logging level to syslog (by logger command)
-# - @var KDUMP_KMSGLOGLVL - logging level to /dev/kmsg (only for boot-time)
-#
-# In the second kernel, kdump will use the rd.kdumploglvl option to set the
-# log level in the above KDUMP_COMMANDLINE_APPEND.
-# - @var rd.kdumploglvl - logging level to syslog (by logger command)
-# - for example: add the rd.kdumploglvl=3 option to KDUMP_COMMANDLINE_APPEND
-#
-# Logging levels: no logging(0), error(1),warn(2),info(3),debug(4)
-#
-# KDUMP_STDLOGLVL=3
-# KDUMP_SYSLOGLVL=0
-# KDUMP_KMSGLOGLVL=0
diff --git a/kdump.sysconfig.i386 b/kdump.sysconfig.i386
deleted file mode 100644
index 7e18c1c..0000000
--- a/kdump.sysconfig.i386
+++ /dev/null
@@ -1,56 +0,0 @@
-# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
-# If no version is specified, then the init script will try to find a
-# kdump kernel with the same version number as the running kernel.
-KDUMP_KERNELVER=""
-
-# The kdump commandline is the command line that needs to be passed off to
-# the kdump kernel. This will likely match the contents of the grub kernel
-# line. For example:
-# KDUMP_COMMANDLINE="ro root=LABEL=/"
-# Dracut depends on proper root= options, so please make sure that appropriate
-# root= options are copied from /proc/cmdline. In general it is best to append
-# command line options using "KDUMP_COMMANDLINE_APPEND=".
-# If a command line is not specified, the default will be taken from
-# /proc/cmdline
-KDUMP_COMMANDLINE=""
-
-# This variable lets us remove arguments from the current kdump commandline
-# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-# NOTE: some arguments such as crashkernel will always be removed
-KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swiotlb cma hugetlb_cma"
-
-# This variable lets us append arguments to the current kdump commandline
-# after processed by KDUMP_COMMANDLINE_REMOVE
-KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd cma=0 hugetlb_cma=0"
-
-# Any additional kexec arguments required. In most situations, this should
-# be left empty
-#
-# Example:
-# KEXEC_ARGS="--elf32-core-headers"
-KEXEC_ARGS=""
-
-#Where to find the boot image
-#KDUMP_BOOTDIR="/boot"
-
-#What is the image type used for kdump
-KDUMP_IMG="vmlinuz"
-
-#What is the images extension. Relocatable kernels don't have one
-KDUMP_IMG_EXT=""
-
-# Logging is controlled by following variables in the first kernel:
-# - @var KDUMP_STDLOGLVL - logging level to standard error (console output)
-# - @var KDUMP_SYSLOGLVL - logging level to syslog (by logger command)
-# - @var KDUMP_KMSGLOGLVL - logging level to /dev/kmsg (only for boot-time)
-#
-# In the second kernel, kdump will use the rd.kdumploglvl option to set the
-# log level in the above KDUMP_COMMANDLINE_APPEND.
-# - @var rd.kdumploglvl - logging level to syslog (by logger command)
-# - for example: add the rd.kdumploglvl=3 option to KDUMP_COMMANDLINE_APPEND
-#
-# Logging levels: no logging(0), error(1),warn(2),info(3),debug(4)
-#
-# KDUMP_STDLOGLVL=3
-# KDUMP_SYSLOGLVL=0
-# KDUMP_KMSGLOGLVL=0
diff --git a/kdump.sysconfig.ppc64 b/kdump.sysconfig.ppc64
deleted file mode 100644
index ebb22f6..0000000
--- a/kdump.sysconfig.ppc64
+++ /dev/null
@@ -1,58 +0,0 @@
-# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
-# If no version is specified, then the init script will try to find a
-# kdump kernel with the same version number as the running kernel.
-KDUMP_KERNELVER=""
-
-# The kdump commandline is the command line that needs to be passed off to
-# the kdump kernel. This will likely match the contents of the grub kernel
-# line. For example:
-# KDUMP_COMMANDLINE="ro root=LABEL=/"
-# Dracut depends on proper root= options, so please make sure that appropriate
-# root= options are copied from /proc/cmdline. In general it is best to append
-# command line options using "KDUMP_COMMANDLINE_APPEND=".
-# If a command line is not specified, the default will be taken from
-# /proc/cmdline
-KDUMP_COMMANDLINE=""
-
-# This variable lets us remove arguments from the current kdump commandline
-# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-# NOTE: some arguments such as crashkernel will always be removed
-KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swiotlb hugetlb_cma"
-
-# This variable lets us append arguments to the current kdump commandline
-# after processed by KDUMP_COMMANDLINE_REMOVE
-KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0"
-
-# Any additional kexec arguments required. In most situations, this should
-# be left empty
-#
-# Example:
-# KEXEC_ARGS="--elf32-core-headers"
-KEXEC_ARGS="--dt-no-old-root"
-
-#Where to find the boot image
-#KDUMP_BOOTDIR="/boot"
-
-#What is the image type used for kdump
-KDUMP_IMG="vmlinuz"
-
-#What is the images extension. Relocatable kernels don't have one
-KDUMP_IMG_EXT=""
-
-#Specify the action after failure
-
-# Logging is controlled by following variables in the first kernel:
-# - @var KDUMP_STDLOGLVL - logging level to standard error (console output)
-# - @var KDUMP_SYSLOGLVL - logging level to syslog (by logger command)
-# - @var KDUMP_KMSGLOGLVL - logging level to /dev/kmsg (only for boot-time)
-#
-# In the second kernel, kdump will use the rd.kdumploglvl option to set the
-# log level in the above KDUMP_COMMANDLINE_APPEND.
-# - @var rd.kdumploglvl - logging level to syslog (by logger command)
-# - for example: add the rd.kdumploglvl=3 option to KDUMP_COMMANDLINE_APPEND
-#
-# Logging levels: no logging(0), error(1),warn(2),info(3),debug(4)
-#
-# KDUMP_STDLOGLVL=3
-# KDUMP_SYSLOGLVL=0
-# KDUMP_KMSGLOGLVL=0
diff --git a/kdump.sysconfig.ppc64le b/kdump.sysconfig.ppc64le
deleted file mode 100644
index 270a2cf..0000000
--- a/kdump.sysconfig.ppc64le
+++ /dev/null
@@ -1,58 +0,0 @@
-# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
-# If no version is specified, then the init script will try to find a
-# kdump kernel with the same version number as the running kernel.
-KDUMP_KERNELVER=""
-
-# The kdump commandline is the command line that needs to be passed off to
-# the kdump kernel. This will likely match the contents of the grub kernel
-# line. For example:
-# KDUMP_COMMANDLINE="ro root=LABEL=/"
-# Dracut depends on proper root= options, so please make sure that appropriate
-# root= options are copied from /proc/cmdline. In general it is best to append
-# command line options using "KDUMP_COMMANDLINE_APPEND=".
-# If a command line is not specified, the default will be taken from
-# /proc/cmdline
-KDUMP_COMMANDLINE=""
-
-# This variable lets us remove arguments from the current kdump commandline
-# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-# NOTE: some arguments such as crashkernel will always be removed
-KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swiotlb hugetlb_cma"
-
-# This variable lets us append arguments to the current kdump commandline
-# after processed by KDUMP_COMMANDLINE_REMOVE
-KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0"
-
-# Any additional kexec arguments required. In most situations, this should
-# be left empty
-#
-# Example:
-# KEXEC_ARGS="--elf32-core-headers"
-KEXEC_ARGS="--dt-no-old-root -s"
-
-#Where to find the boot image
-#KDUMP_BOOTDIR="/boot"
-
-#What is the image type used for kdump
-KDUMP_IMG="vmlinuz"
-
-#What is the images extension. Relocatable kernels don't have one
-KDUMP_IMG_EXT=""
-
-#Specify the action after failure
-
-# Logging is controlled by following variables in the first kernel:
-# - @var KDUMP_STDLOGLVL - logging level to standard error (console output)
-# - @var KDUMP_SYSLOGLVL - logging level to syslog (by logger command)
-# - @var KDUMP_KMSGLOGLVL - logging level to /dev/kmsg (only for boot-time)
-#
-# In the second kernel, kdump will use the rd.kdumploglvl option to set the
-# log level in the above KDUMP_COMMANDLINE_APPEND.
-# - @var rd.kdumploglvl - logging level to syslog (by logger command)
-# - for example: add the rd.kdumploglvl=3 option to KDUMP_COMMANDLINE_APPEND
-#
-# Logging levels: no logging(0), error(1),warn(2),info(3),debug(4)
-#
-# KDUMP_STDLOGLVL=3
-# KDUMP_SYSLOGLVL=0
-# KDUMP_KMSGLOGLVL=0
diff --git a/kdump.sysconfig.s390x b/kdump.sysconfig.s390x
deleted file mode 100644
index 234cfe9..0000000
--- a/kdump.sysconfig.s390x
+++ /dev/null
@@ -1,59 +0,0 @@
-# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
-# If no version is specified, then the init script will try to find a
-# kdump kernel with the same version number as the running kernel.
-KDUMP_KERNELVER=""
-
-# The kdump commandline is the command line that needs to be passed off to
-# the kdump kernel. This will likely match the contents of the grub kernel
-# line. For example:
-# KDUMP_COMMANDLINE="ro root=LABEL=/"
-# Dracut depends on proper root= options, so please make sure that appropriate
-# root= options are copied from /proc/cmdline. In general it is best to append
-# command line options using "KDUMP_COMMANDLINE_APPEND=".
-# If a command line is not specified, the default will be taken from
-# /proc/cmdline
-KDUMP_COMMANDLINE=""
-
-# This variable lets us remove arguments from the current kdump commandline
-# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-# NOTE: some arguments such as crashkernel will always be removed
-KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swiotlb vmcp_cma cma hugetlb_cma prot_virt"
-
-# This variable lets us append arguments to the current kdump commandline
-# after processed by KDUMP_COMMANDLINE_REMOVE
-KDUMP_COMMANDLINE_APPEND="nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd vmcp_cma=0 cma=0 hugetlb_cma=0"
-
-# Any additional /sbin/mkdumprd arguments required.
-MKDUMPRD_ARGS=""
-
-# Any additional kexec arguments required. In most situations, this should
-# be left empty
-#
-# Example:
-# KEXEC_ARGS="--elf32-core-headers"
-KEXEC_ARGS="-s"
-
-#Where to find the boot image
-#KDUMP_BOOTDIR="/boot"
-
-#What is the image type used for kdump
-KDUMP_IMG="vmlinuz"
-
-#What is the images extension. Relocatable kernels don't have one
-KDUMP_IMG_EXT=""
-
-# Logging is controlled by following variables in the first kernel:
-# - @var KDUMP_STDLOGLVL - logging level to standard error (console output)
-# - @var KDUMP_SYSLOGLVL - logging level to syslog (by logger command)
-# - @var KDUMP_KMSGLOGLVL - logging level to /dev/kmsg (only for boot-time)
-#
-# In the second kernel, kdump will use the rd.kdumploglvl option to set the
-# log level in the above KDUMP_COMMANDLINE_APPEND.
-# - @var rd.kdumploglvl - logging level to syslog (by logger command)
-# - for example: add the rd.kdumploglvl=3 option to KDUMP_COMMANDLINE_APPEND
-#
-# Logging levels: no logging(0), error(1),warn(2),info(3),debug(4)
-#
-# KDUMP_STDLOGLVL=3
-# KDUMP_SYSLOGLVL=0
-# KDUMP_KMSGLOGLVL=0
diff --git a/kdump.sysconfig b/kdump.sysconfig.template
similarity index 96%
rename from kdump.sysconfig
rename to kdump.sysconfig.template
index 70ebf04..39b1bdf 100644
--- a/kdump.sysconfig
+++ b/kdump.sysconfig.template
@@ -36,6 +36,9 @@ KEXEC_ARGS=""
#What is the image type used for kdump
KDUMP_IMG="vmlinuz"
+#What is the images extension. Relocatable kernels don't have one
+KDUMP_IMG_EXT=""
+
# Logging is controlled by following variables in the first kernel:
# - @var KDUMP_STDLOGLVL - logging level to standard error (console output)
# - @var KDUMP_SYSLOGLVL - logging level to syslog (by logger command)
diff --git a/kdump.sysconfig.x86_64 b/kdump.sysconfig.x86_64
deleted file mode 100644
index 188ba3c..0000000
--- a/kdump.sysconfig.x86_64
+++ /dev/null
@@ -1,56 +0,0 @@
-# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
-# If no version is specified, then the init script will try to find a
-# kdump kernel with the same version number as the running kernel.
-KDUMP_KERNELVER=""
-
-# The kdump commandline is the command line that needs to be passed off to
-# the kdump kernel. This will likely match the contents of the grub kernel
-# line. For example:
-# KDUMP_COMMANDLINE="ro root=LABEL=/"
-# Dracut depends on proper root= options, so please make sure that appropriate
-# root= options are copied from /proc/cmdline. In general it is best to append
-# command line options using "KDUMP_COMMANDLINE_APPEND=".
-# If a command line is not specified, the default will be taken from
-# /proc/cmdline
-KDUMP_COMMANDLINE=""
-
-# This variable lets us remove arguments from the current kdump commandline
-# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-# NOTE: some arguments such as crashkernel will always be removed
-KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swiotlb cma hugetlb_cma"
-
-# This variable lets us append arguments to the current kdump commandline
-# after processed by KDUMP_COMMANDLINE_REMOVE
-KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 acpi_no_memhotplug transparent_hugepage=never nokaslr hest_disable novmcoredd cma=0 hugetlb_cma=0"
-
-# Any additional kexec arguments required. In most situations, this should
-# be left empty
-#
-# Example:
-# KEXEC_ARGS="--elf32-core-headers"
-KEXEC_ARGS="-s"
-
-#Where to find the boot image
-#KDUMP_BOOTDIR="/boot"
-
-#What is the image type used for kdump
-KDUMP_IMG="vmlinuz"
-
-#What is the images extension. Relocatable kernels don't have one
-KDUMP_IMG_EXT=""
-
-# Logging is controlled by following variables in the first kernel:
-# - @var KDUMP_STDLOGLVL - logging level to standard error (console output)
-# - @var KDUMP_SYSLOGLVL - logging level to syslog (by logger command)
-# - @var KDUMP_KMSGLOGLVL - logging level to /dev/kmsg (only for boot-time)
-#
-# In the second kernel, kdump will use the rd.kdumploglvl option to set the
-# log level in the above KDUMP_COMMANDLINE_APPEND.
-# - @var rd.kdumploglvl - logging level to syslog (by logger command)
-# - for example: add the rd.kdumploglvl=3 option to KDUMP_COMMANDLINE_APPEND
-#
-# Logging levels: no logging(0), error(1),warn(2),info(3),debug(4)
-#
-# KDUMP_STDLOGLVL=3
-# KDUMP_SYSLOGLVL=0
-# KDUMP_KMSGLOGLVL=0
diff --git a/kexec-tools.spec b/kexec-tools.spec
index db6374c..08957b7 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -11,10 +11,8 @@ Summary: The kexec/kdump userspace component
Source0: http://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
Source1: kdumpctl
-Source2: kdump.sysconfig
-Source3: kdump.sysconfig.x86_64
-Source4: kdump.sysconfig.i386
-Source5: kdump.sysconfig.ppc64
+Source2: kdump.sysconfig.template
+Source3: kdump-gen-sysconfig.sh
Source7: mkdumprd
Source8: kdump.conf
Source9: https://github.com/makedumpfile/makedumpfile/archive/%{mkdf_ver}/makedump...
@@ -25,18 +23,15 @@ Source13: 98-kexec.rules
Source14: 98-kexec.rules.ppc64
Source15: kdump.conf.5
Source16: kdump.service
-Source18: kdump.sysconfig.s390x
Source19: https://github.com/lucchouina/eppic/archive/%{eppic_ver}/eppic-%{eppic_sh...
Source20: kdump-lib.sh
Source21: kdump-in-cluster-environment.txt
Source22: kdump-dep-generator.sh
Source23: kdump-lib-initramfs.sh
-Source24: kdump.sysconfig.ppc64le
Source25: kdumpctl.8
Source26: live-image-kdump-howto.txt
Source27: early-kdump-howto.txt
Source28: kdump-udev-throttler
-Source29: kdump.sysconfig.aarch64
Source30: 60-kdump.install
Source31: kdump-logger.sh
Source32: mkfadumprd
@@ -152,6 +147,9 @@ cp %{SOURCE26} .
cp %{SOURCE27} .
cp %{SOURCE34} .
+# Generate sysconfig file
+%{SOURCE3} %{SOURCE2} %{_target_cpu} > kdump.sysconfig
+
make
%ifarch %{ix86} x86_64 ppc64 s390x ppc64le aarch64
make -C eppic-%{eppic_ver}/libeppic
@@ -183,13 +181,9 @@ install -m 755 build/sbin/vmcore-dmesg $RPM_BUILD_ROOT/usr/sbin/vmcore-dmesg
install -m 644 build/man/man8/kexec.8 $RPM_BUILD_ROOT%{_mandir}/man8/
install -m 644 build/man/man8/vmcore-dmesg.8 $RPM_BUILD_ROOT%{_mandir}/man8/
-SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_target_cpu}
-[ -f $SYSCONFIG ] || SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_arch}
-[ -f $SYSCONFIG ] || SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig
-install -m 644 $SYSCONFIG $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/kdump
-
install -m 755 %{SOURCE7} $RPM_BUILD_ROOT/usr/sbin/mkdumprd
install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/kdump.conf
+install -m 644 kdump.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/kdump
install -m 644 kexec/kexec.8 $RPM_BUILD_ROOT%{_mandir}/man8/kexec.8
install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_mandir}/man8/mkdumprd.8
install -m 644 %{SOURCE25} $RPM_BUILD_ROOT%{_mandir}/man8/kdumpctl.8
--
2.35.2
1 year, 6 months
[PATCH] spec: Use zlib/dfltcc as default to improve compression speed and ratio on s390x
by Pingfan Liu
s390x implements zlib/dfltcc dedicated instruction to improve
compression speed and ratio. Switching from 'makedumpfile -l' to
'makedumpfile -c' to benifit from this feature.
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
kexec-tools.spec | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kexec-tools.spec b/kexec-tools.spec
index 6673000..9f1ba34 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -275,6 +275,10 @@ fi
%systemd_post kdump.service
touch /etc/kdump.conf
+# s390 uses zlib/dfltcc as default to improve compression speed and ratio
+%ifarch s390x
+sed -i 's/makedumpfile -l/makedumpfile -c/' /etc/kdump.conf
+%endif
%ifarch ppc64 ppc64le
servicelog_notify --remove --command=/usr/lib/kdump/kdump-migrate-action.sh 2>/dev/null
--
2.31.1
1 year, 7 months