Accepting request 548154 from home:michals
- kdump-Dont-exit-even-if-initrd-is-not-built.patch: fadump restart does not always rebuild initramfs but may need to re-register (bsc#1047781). - kdump-Limit-kdump-cpus-to-number-provided-by-config.patch (bsc#1036223, bsc#1068234). - kdump-Don-t-split-by-default.patch (bsc#1036223, bsc#1068234). OBS-URL: https://build.opensuse.org/request/show/548154 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=140
This commit is contained in:
parent
1f7858a76c
commit
7f0ca4aa73
45
kdump-Don-t-split-by-default.patch
Normal file
45
kdump-Don-t-split-by-default.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 51a68c31497d1895602d5c6851e23a9027d9675d Mon Sep 17 00:00:00 2001
|
||||
From: Ankit Kumar <ankit@linux.vnet.ibm.com>
|
||||
Date: Thu, 10 Aug 2017 15:04:32 +0530
|
||||
Subject: [PATCH] Don't split by default
|
||||
|
||||
References: bsc#1036223, bsc#1068234
|
||||
Patch-mainline: v0.8.17
|
||||
Git-commit: 51a68c31497d1895602d5c6851e23a9027d9675d
|
||||
|
||||
Currently, we are default'ing to "SPILT" as well as multi-threading
|
||||
when KDUMPTOOL_FLAGS="". Ensure split is enabled only when it is set
|
||||
explicitly with KDUMPTOOL_FLAGS="SPLIT".
|
||||
|
||||
Signed-off-by: Ankit Kumar <ankit@linux.vnet.ibm.com>
|
||||
---
|
||||
kdumptool/savedump.cc | 11 ++++-------
|
||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/kdumptool/savedump.cc b/kdumptool/savedump.cc
|
||||
index ec66e63bd29b..e832bf98b762 100644
|
||||
--- a/kdumptool/savedump.cc
|
||||
+++ b/kdumptool/savedump.cc
|
||||
@@ -294,15 +294,12 @@ void SaveDump::saveDump(const RootDirURLVector &urlv)
|
||||
if (cpus > online_cpus)
|
||||
cpus = online_cpus;
|
||||
}
|
||||
- if (!config->kdumptoolContainsFlag("NOSPLIT") &&
|
||||
- !config->kdumptoolContainsFlag("SINGLE") &&
|
||||
+ if (!config->kdumptoolContainsFlag("SINGLE") &&
|
||||
cpus > 1) {
|
||||
- if (!useElf)
|
||||
- m_split = cpus;
|
||||
- else
|
||||
- cerr << "Splitting ELF dumps is not supported." << endl;
|
||||
|
||||
- if (config->kdumptoolContainsFlag("SPLIT")) {
|
||||
+ /* The check for NOSPLIT is for backward compatibility */
|
||||
+ if (config->kdumptoolContainsFlag("SPLIT") &&
|
||||
+ !config->kdumptoolContainsFlag("NOSPLIT")) {
|
||||
if (!useElf)
|
||||
m_split = cpus;
|
||||
else
|
||||
--
|
||||
2.13.6
|
||||
|
50
kdump-Dont-exit-even-if-initrd-is-not-built.patch
Normal file
50
kdump-Dont-exit-even-if-initrd-is-not-built.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 086068496508087b68029ae31a93ed5d3e4ac2cb Mon Sep 17 00:00:00 2001
|
||||
From: Ankit Kumar <ankit@linux.vnet.ibm.com>
|
||||
Date: Mon, 7 Aug 2017 20:35:04 +0530
|
||||
Subject: [PATCH] Don't exit even if initrd is not built
|
||||
|
||||
References: bsc#1047781
|
||||
Patch-mainline: v0.8.17
|
||||
Git-commit: 086068496508087b68029ae31a93ed5d3e4ac2cb
|
||||
|
||||
In case where there is no change in kdump config, new initrd won't be
|
||||
built. Restarting kdump.service in above case exits as initrd is same
|
||||
as older. As control doesn't proceed further, it fails to enable dump
|
||||
configuration.
|
||||
|
||||
This patch fixes above mentioned issue by proceeding further and enabling
|
||||
dump configuration.
|
||||
|
||||
Signed-off-by: Ankit Kumar <ankit@linux.vnet.ibm.com>
|
||||
Acked-by: Michal Suchanek <msuchanek@suse.de>
|
||||
---
|
||||
init/load.sh | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/init/load.sh b/init/load.sh
|
||||
index 4fc7a82e7199..6910bc546d9c 100755
|
||||
--- a/init/load.sh
|
||||
+++ b/init/load.sh
|
||||
@@ -309,13 +309,13 @@ if [ "$1" = "--update" ] ; then
|
||||
rebuild_kdumprd || exit 1
|
||||
after=$(stat -c %Y $kdump_initrd)
|
||||
|
||||
- # If the initial ram disk was not updated,
|
||||
- # do not execute kexec again. This script
|
||||
- # is called from kdump.service and
|
||||
+ # This script is called from kdump.service and
|
||||
# kdump-rebuild-initrd.service.
|
||||
- if [ "$before" = "$after" ] ; then
|
||||
- exit 0
|
||||
- fi
|
||||
+ # Proceed further even if there is no change in initrd
|
||||
+ # because restart kdump.service unloads kdump/fadump and
|
||||
+ # in next service start below enablement will be required
|
||||
+ # otherwise kdump/fadump won't be enabled and leads to panic
|
||||
+ # on crash.
|
||||
fi
|
||||
|
||||
if [ "$KDUMP_FADUMP" = "yes" ] ; then
|
||||
--
|
||||
2.13.6
|
||||
|
53
kdump-Limit-kdump-cpus-to-number-provided-by-config.patch
Normal file
53
kdump-Limit-kdump-cpus-to-number-provided-by-config.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 4fc281692f5bef9a23c603a37e7a1bc30ee0a855 Mon Sep 17 00:00:00 2001
|
||||
From: Ankit Kumar <ankit@linux.vnet.ibm.com>
|
||||
Date: Thu, 10 Aug 2017 09:43:47 +0530
|
||||
Subject: [PATCH] Limit kdump cpus to number provided by config
|
||||
|
||||
References: bsc#1036223, bsc#1068234
|
||||
Patch-mainline: v0.8.17
|
||||
Git-commit: 4fc281692f5bef9a23c603a37e7a1bc30ee0a855
|
||||
|
||||
Current piece of code doesn't verify number of kdump cpus provided in
|
||||
config with number of online cpus and uses all online cpus as kdump cpus
|
||||
even if KDUMP_CPUS are provided in the config.
|
||||
Current code:
|
||||
If online cpus = 5 and KDUMP_CPUS = 2 , then current piece of code
|
||||
considers all online cpus as kdump cpus which is 5 but as KDUMP_CPUS
|
||||
is provided as 2, we should restrict makedumpfile to use KDUMP_CPUS
|
||||
which is 2 in this case.
|
||||
|
||||
In case of kdump, as we use maxcpus=1 and hence online cpus remains 1
|
||||
but in case of fadump all cpus are online and even after providing
|
||||
KDUMP_CPUS=1 in config, it consider all online cpus as kdump cpus.
|
||||
|
||||
This patch fixes above issue by verifying KDUMP_CPUS with online cpus.
|
||||
If KDUMP_CPUS > online cpus then only use online cpus as kdump
|
||||
cpus else use KDUMP_CPUS as dump cpus.
|
||||
|
||||
Signed-off-by: Ankit Kumar <ankit@linux.vnet.ibm.com>
|
||||
---
|
||||
kdumptool/savedump.cc | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kdumptool/savedump.cc b/kdumptool/savedump.cc
|
||||
index a2fb1589d9db..ec66e63bd29b 100644
|
||||
--- a/kdumptool/savedump.cc
|
||||
+++ b/kdumptool/savedump.cc
|
||||
@@ -286,9 +286,13 @@ void SaveDump::saveDump(const RootDirURLVector &urlv)
|
||||
return; // nothing to be done
|
||||
|
||||
unsigned long cpus = config->KDUMP_CPUS.value();
|
||||
+ unsigned long online_cpus = 0;
|
||||
if (cpus) {
|
||||
SystemCPU syscpu;
|
||||
- cpus = syscpu.numOnline();
|
||||
+ online_cpus = syscpu.numOnline();
|
||||
+ /* Limit kdump cpus to online cpus if (KDUMP_CPUS > online cpus) */
|
||||
+ if (cpus > online_cpus)
|
||||
+ cpus = online_cpus;
|
||||
}
|
||||
if (!config->kdumptoolContainsFlag("NOSPLIT") &&
|
||||
!config->kdumptoolContainsFlag("SINGLE") &&
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 15 12:25:57 UTC 2017 - msuchanek@suse.com
|
||||
|
||||
- kdump-Dont-exit-even-if-initrd-is-not-built.patch: fadump restart does not
|
||||
always rebuild initramfs but may need to re-register (bsc#1047781).
|
||||
- kdump-Limit-kdump-cpus-to-number-provided-by-config.patch (bsc#1036223, bsc#1068234).
|
||||
- kdump-Don-t-split-by-default.patch (bsc#1036223, bsc#1068234).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 29 16:31:26 UTC 2017 - ptesarik@suse.com
|
||||
|
||||
|
@ -67,6 +67,9 @@ Patch22: %{name}-multithreading-by-default.patch
|
||||
Patch23: %{name}-explicitly-request-zFCP-devices.patch
|
||||
Patch24: %{name}-fail-if-fadump-cannot-be-registered.patch
|
||||
Patch25: %{name}-activate-QETH-devices.patch
|
||||
Patch26: %{name}-Dont-exit-even-if-initrd-is-not-built.patch
|
||||
Patch27: %{name}-Limit-kdump-cpus-to-number-provided-by-config.patch
|
||||
Patch28: %{name}-Don-t-split-by-default.patch
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
@ -152,6 +155,9 @@ cp %{S:1} tests/data/
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
%patch26 -p1
|
||||
%patch27 -p1
|
||||
%patch28 -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user