Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.0:Staging:D
kdump
kdump-Limit-kdump-cpus-to-number-provided-by-co...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kdump-Limit-kdump-cpus-to-number-provided-by-config.patch of Package kdump
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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor