Skip to contentSkip to conversation

Documentation: Add description of enable multi-cpus support for kdump

PATCH RESEND In review Baoquan He 2 participants 6 messages Sep 19, 2016 – Sep 21, 2016

Subsystems (3)
lore
Share & tools
lore

Baoquan He

author
#0 lore raw

v10 cover Documentation: Add description of enable multi-cpus support for kdump

This is v10 post. In this patchset patch 1/3 is added to give more details about nr_cpus and maxcpus in kernel-parameters.txt. This is suggested by Jonathan since the description of them is unclear so that people can't see what's the exact difference between them. Otherwise no big further change for 2/3 and 3/3 which comprise the old post.

Please access below link to check the previous changelog.
https://lkml.org/lkml/2016/8/17/646
Baoquan He (1):
docs: kernel-parameter : Improve the description of nr_cpus and
maxcpus

Zhou Wenjian (2):
Documentation: kdump: remind user of nr_cpus
Documentation: kdump: add description of enable multi-cpus support

 Documentation/kdump/kdump.txt       |  9 +++++++++
 Documentation/kernel-parameters.txt | 20 +++++++++++++-------
 2 files changed, 22 insertions(+), 7 deletions(-)
Signature · 1 line
2.5.5
author
#1 lore raw

PATCH RESEND v10 1/3 docs: kernel-parameter : Improve the description of nr_cpus and maxcpus

From the old description people still can't get what's the exact difference between nr_cpus and maxcpus. Especially in kdump kernel nr_cpus is always suggested if it's implemented in ARCH. The reason is nr_cpus is used to limit the max number of possible cpu in system, the sum of already plugged cpus and hot plug cpus can't exceed its value. However maxcpus is used to limit how many cpus are allowed to be brought up during bootup.

---
 Documentation/kernel-parameters.txt | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
Documentation/kernel-parameters.txt +13 -7
index a4f4d69..98d6406 100644
@@ -2161,10 +2161,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			than or equal to this physical address is ignored.
 
 	maxcpus=	[SMP] Maximum number of processors that	an SMP kernel
-			should make use of.  maxcpus=n : n >= 0 limits the
-			kernel to using 'n' processors.  n=0 is a special case,
-			it is equivalent to "nosmp", which also disables
-			the IO APIC.
+			will bring up during bootup.  maxcpus=n : n >= 0 limits
+			the kernel to bring up 'n' processors. Surely after
+			bootup you can bring up the other plugged cpu by executing
+			"echo 1 > /sys/devices/system/cpu/cpuX/online". So maxcpus
+			only takes effect during system bootup.
+			While n=0 is a special case, it is equivalent to "nosmp",
+			which also disables the IO APIC.
 
 	max_loop=	[LOOP] The number of loop block devices that get
 	(loop.max_loop)	unconditionally pre-created at init time. The default
@@ -2773,9 +2776,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
 	nr_cpus=	[SMP] Maximum number of processors that	an SMP kernel
 			could support.  nr_cpus=n : n >= 1 limits the kernel to
-			supporting 'n' processors. Later in runtime you can not
-			use hotplug cpu feature to put more cpu back to online.
-			just like you compile the kernel NR_CPUS=n
+			support 'n' processors. It could be larger than the
+			number of already plugged CPU during bootup, later in
+			runtime you can physically add extra cpu until it reaches
+			n. So during boot up some boot time memory for per-cpu
+			variables need be pre-allocated for later physical cpu
+			hot plugging.
 
 	nr_uarts=	[SERIAL] maximum number of UARTs to be registered.
 
Signature · 7 lines
2.5.5


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
author
#2 lore raw

PATCH RESEND v10 2/3 Documentation: kdump: Remind user of nr_cpus

In reply to Baoquan He

From: Zhou Wenjian <[email protected]>

nr_cpus can help to save memory. So we should remind user of it.

---
 Documentation/kdump/kdump.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/kdump/kdump.txt +2 -0
index 88ff63d..f7ef340 100644
@@ -393,6 +393,8 @@ Notes on loading the dump-capture kernel:
 * We generally don' have to bring up a SMP kernel just to capture the
   dump. Hence generally it is useful either to build a UP dump-capture
   kernel or specify maxcpus=1 option while loading dump-capture kernel.
+  Note, though maxcpus always works, you had better replace it with
+  nr_cpus to save memory if supported by the current ARCH, such as x86.
 
 * For s390x there are two kdump modes: If a ELF header is specified with
   the elfcorehdr= kernel parameter, it is used by the kdump kernel as it
Signature · 1 line
2.5.5
author
#3 lore raw

PATCH RESEND v10 3/3 Documentation: kdump: Add description of enable multi-cpus support

In reply to Baoquan He

From: Zhou Wenjian <[email protected]>

Multi-cpu support is useful to improve the performance of kdump in some cases. So add the description of enable multi-cpu support in dump-capture kernel.

---
 Documentation/kdump/kdump.txt | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/kdump/kdump.txt +7 -0
index f7ef340..b0eb27b 100644
@@ -396,6 +396,13 @@ Notes on loading the dump-capture kernel:
   Note, though maxcpus always works, you had better replace it with
   nr_cpus to save memory if supported by the current ARCH, such as x86.
 
+* You should enable multi-cpu support in dump-capture kernel if you intend
+  to use multi-thread programs with it, such as parallel dump feature of
+  makedumpfile. Otherwise, the multi-thread program may have a great
+  performance degradation. To enable multi-cpu support, you should bring up an
+  SMP dump-capture kernel and specify maxcpus/nr_cpus, disable_cpu_apicid=[X]
+  options while loading it.
+
 * For s390x there are two kdump modes: If a ELF header is specified with
   the elfcorehdr= kernel parameter, it is used by the kdump kernel as it
   is done on all other architectures. If no elfcorehdr= kernel parameter is
Signature · 1 line
2.5.5
maintainer
#4 lore raw
In reply to Baoquan He
Quoted 5 lines · On Mon, 19 Sep 2016 13:59:46 +0800 Baoquan He <[email protected]> wrote:

This is v10 post. In this patchset patch 1/3 is added to give more details about nr_cpus and maxcpus in kernel-parameters.txt. This is suggested by Jonathan since the description of them is unclear so that people can't see what's the exact difference between them. Otherwise no big further change for 2/3 and 3/3 which comprise the old post.

So somehow I'd applied 1/3 a while back, but not the other two. All three are in the docs tree now, thanks.

jon

author
#5 lore raw
Quoted 11 lines · Jonathan Corbet
Quoted 5 lines · On Mon, 19 Sep 2016 13:59:46 +0800 Baoquan He <[email protected]> wrote:

This is v10 post. In this patchset patch 1/3 is added to give more details about nr_cpus and maxcpus in kernel-parameters.txt. This is suggested by Jonathan since the description of them is unclear so that people can't see what's the exact difference between them. Otherwise no big further change for 2/3 and 3/3 which comprise the old post.

So somehow I'd applied 1/3 a while back, but not the other two. All three are in the docs tree now, thanks.

Thanks!