linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump
@ 2016-09-19  5:59 Baoquan He
  2016-09-19  5:59 ` [PATCH v10 RESEND 1/3] docs: kernel-parameter : Improve the description of nr_cpus and maxcpus Baoquan He
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Baoquan He @ 2016-09-19  5:59 UTC (permalink / raw)
  To: corbet, akpm; +Cc: linux-doc, kexec, linux-kernel, xlpang, dyoung, Baoquan He

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(-)

-- 
2.5.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v10 RESEND 1/3] docs: kernel-parameter : Improve the description of nr_cpus and maxcpus
  2016-09-19  5:59 [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump Baoquan He
@ 2016-09-19  5:59 ` Baoquan He
  2016-09-19  5:59 ` [PATCH v10 RESEND 2/3] Documentation: kdump: Remind user of nr_cpus Baoquan He
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Baoquan He @ 2016-09-19  5:59 UTC (permalink / raw)
  To: corbet, akpm; +Cc: linux-doc, kexec, linux-kernel, xlpang, dyoung, Baoquan He

>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.

Signed-off-by: Baoquan He <bhe@redhat.com>
---
 Documentation/kernel-parameters.txt | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index a4f4d69..98d6406 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -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.
 
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v10 RESEND 2/3] Documentation: kdump: Remind user of nr_cpus
  2016-09-19  5:59 [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump Baoquan He
  2016-09-19  5:59 ` [PATCH v10 RESEND 1/3] docs: kernel-parameter : Improve the description of nr_cpus and maxcpus Baoquan He
@ 2016-09-19  5:59 ` Baoquan He
  2016-09-19  5:59 ` [PATCH v10 RESEND 3/3] Documentation: kdump: Add description of enable multi-cpus support Baoquan He
  2016-09-21  0:03 ` [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump Jonathan Corbet
  3 siblings, 0 replies; 6+ messages in thread
From: Baoquan He @ 2016-09-19  5:59 UTC (permalink / raw)
  To: corbet, akpm; +Cc: linux-doc, kexec, linux-kernel, xlpang, dyoung, Zhou Wenjian

From: Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com>

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

Signed-off-by: Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: Xunlei Pang <xpang@redhat.com>
---
 Documentation/kdump/kdump.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index 88ff63d..f7ef340 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -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
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v10 RESEND 3/3] Documentation: kdump: Add description of enable multi-cpus support
  2016-09-19  5:59 [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump Baoquan He
  2016-09-19  5:59 ` [PATCH v10 RESEND 1/3] docs: kernel-parameter : Improve the description of nr_cpus and maxcpus Baoquan He
  2016-09-19  5:59 ` [PATCH v10 RESEND 2/3] Documentation: kdump: Remind user of nr_cpus Baoquan He
@ 2016-09-19  5:59 ` Baoquan He
  2016-09-21  0:03 ` [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump Jonathan Corbet
  3 siblings, 0 replies; 6+ messages in thread
From: Baoquan He @ 2016-09-19  5:59 UTC (permalink / raw)
  To: corbet, akpm; +Cc: linux-doc, kexec, linux-kernel, xlpang, dyoung, Zhou Wenjian

From: Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com>

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.

Signed-off-by: Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: Xunlei Pang <xpang@redhat.com>
---
 Documentation/kdump/kdump.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index f7ef340..b0eb27b 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -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
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump
  2016-09-19  5:59 [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump Baoquan He
                   ` (2 preceding siblings ...)
  2016-09-19  5:59 ` [PATCH v10 RESEND 3/3] Documentation: kdump: Add description of enable multi-cpus support Baoquan He
@ 2016-09-21  0:03 ` Jonathan Corbet
  2016-09-21  1:20   ` Baoquan He
  3 siblings, 1 reply; 6+ messages in thread
From: Jonathan Corbet @ 2016-09-21  0:03 UTC (permalink / raw)
  To: Baoquan He; +Cc: akpm, linux-doc, kexec, linux-kernel, xlpang, dyoung

On Mon, 19 Sep 2016 13:59:46 +0800
Baoquan He <bhe@redhat.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump
  2016-09-21  0:03 ` [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump Jonathan Corbet
@ 2016-09-21  1:20   ` Baoquan He
  0 siblings, 0 replies; 6+ messages in thread
From: Baoquan He @ 2016-09-21  1:20 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: akpm, linux-doc, kexec, linux-kernel, xlpang, dyoung

On 09/20/16 at 06:03pm, Jonathan Corbet wrote:
> On Mon, 19 Sep 2016 13:59:46 +0800
> Baoquan He <bhe@redhat.com> 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!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-21  1:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19  5:59 [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump Baoquan He
2016-09-19  5:59 ` [PATCH v10 RESEND 1/3] docs: kernel-parameter : Improve the description of nr_cpus and maxcpus Baoquan He
2016-09-19  5:59 ` [PATCH v10 RESEND 2/3] Documentation: kdump: Remind user of nr_cpus Baoquan He
2016-09-19  5:59 ` [PATCH v10 RESEND 3/3] Documentation: kdump: Add description of enable multi-cpus support Baoquan He
2016-09-21  0:03 ` [PATCH v10 RESEND 0/3] Documentation: Add description of enable multi-cpus support for kdump Jonathan Corbet
2016-09-21  1:20   ` Baoquan He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).