Re: [PATCH v9 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-21 Thread Zhou, Wenjian/周文剑

On 08/19/2016 11:57 PM, Jonathan Corbet wrote:

On Fri, 19 Aug 2016 08:33:21 +0800
"Zhou, Wenjian/周文剑" <zhouwj-f...@cn.fujitsu.com> wrote:


I was also confused by maxcpus and nr_cpus before writing this patch.
I think it is a good choice to describe it in kernel-parameters.txt.

Then, only two things need to be done I think.
One is move the above description to maxcpus= in kernel-parameters.txt.
And the other is replace maxcpus with maxcpus/nr_cpus in kdump.txt.

How do you think?


That is not quite what I had in mind, sorry.  What I would really like to
see in kernel-parameters.txt is an explanation of how those two parameters
differ - what do they do differently and how should a user choose one over
the other?  What we have now offers no guidance in that matter.



I thought about it. I think user may not need this.
What user really want to know is how to choose.
And it is also not a hard work. If nr_cpus is not supported by the ARCH, use 
maxcpus.
Otherwise, nr_cpus. The reason why maxcpus still exists is nr_cpus can't be 
supported
by some ARCHes.

I think it may be why the author didn't write too much description of it.


I suspect that may be a bit more than you had signed up to do.  As an
intermediate step, how about this: rather than tacking on those lines in
kdump.txt, rewrite that paragraph to simply say what the reader should
use.  If nr_cpus is good for everybody, just say that, but your previous
patch suggests that the situation isn't quite that simple?



Actually, if nr_cpus always usable, there won't be these discussions.


--
Thanks
Zhou


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-18 Thread Zhou, Wenjian/周文剑

Hi Jonathan,

Thanks for your reply.

On 08/19/2016 01:18 AM, Jonathan Corbet wrote:

On Thu, 18 Aug 2016 11:11:46 +0800
Zhou Wenjian <zhouwj-f...@cn.fujitsu.com> wrote:

Thank you for working to improve the documentation!


  * 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 should replace it by nr_cpus to
+  save memory if supported by the current ARCH, such as x86.


So, IMHO, this seems like the wrong place for this.  I've just spent a bit
of time staring at kernel-parameters.txt, and there is no way for a
clueless user like me to know what the difference is between maxcpus= and
nr_cpus= would be.  A far better patch would be to update the
documentation there to make that clear.  Any chance you would be willing
to do that?

Then, rather than tacking an "ignore what you just read" note into
kdump.txt, it could maybe be rewritten to simply say what users should do?



I was also confused by maxcpus and nr_cpus before writing this patch.
I think it is a good choice to describe it in kernel-parameters.txt.

Then, only two things need to be done I think.
One is move the above description to maxcpus= in kernel-parameters.txt.
And the other is replace maxcpus with maxcpus/nr_cpus in kdump.txt.

How do you think?

--
Thanks
Zhou


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-18 Thread Zhou, Wenjian/周文剑

On 08/18/2016 02:47 PM, Dave Young wrote:

On 08/17/16 at 07:36pm, Joe Perches wrote:

On Thu, 2016-08-18 at 10:31 +0800, Zhou Wenjian wrote:

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


trivia:

diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt

[]

@@ -390,9 +390,11 @@ Notes on loading the dump-capture kernel:
  * Boot parameter "1" boots the dump-capture kernel into single-user
mode without networking. If you want networking, use "3".

-* We generally don' have to bring up a SMP kernel just to capture the
+* We generally don' have to bring up an SMP kernel just to capture the


don't or do not



Use do not is better, also need replace 'We' with 'You' to be
consistent with other part.




I think it's better to fix it in another patch,
for it doesn't have much relevance to the patch set.
I'll post it alone later.

--
Thanks
Zhou


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v9 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-17 Thread Zhou Wenjian
nr_cpus can help to save memory. So we should remind user of it.

Signed-off-by: Zhou Wenjian <zhouwj-f...@cn.fujitsu.com>
Acked-by: Baoquan He <b...@redhat.com>
Acked-by: Xunlei Pang <xp...@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..d900080 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 should replace it by 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
-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v9 0/2] update the doc of kdump

2016-08-17 Thread Zhou Wenjian
v8->v9: rearrange the patch.
it won't fix typo which original exists.
those should be fixed in other patch, which I'll post later.
v7->v8: fix "a SMP kernel" to "an SMP kernel" and replace "\" with "/"
v6->v7: fix typo
v5->v6: replace "we" with "you"
v4->v5: move change log to cover letter
v3->v4: update the description of bring up SMP dump-capture kernel
v2->v3: add description of nr_cpus.
v1->v2: change nr_cpus to 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 +
 1 file changed, 9 insertions(+)

-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v9 2/2] Documentation: kdump: add description of enable multi-cpus support

2016-08-17 Thread Zhou Wenjian
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-f...@cn.fujitsu.com>
Acked-by: Baoquan He <b...@redhat.com>
Acked-by: Xunlei Pang <xp...@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 d900080..31e6b88 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 should replace it by 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
-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v8 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-17 Thread Zhou Wenjian
nr_cpus can help to save memory. So we should remind user of it.

Signed-off-by: Zhou Wenjian <zhouwj-f...@cn.fujitsu.com>
Acked-by: Baoquan He <b...@redhat.com>
Acked-by: Xunlei Pang <xp...@redhat.com>
---
 Documentation/kdump/kdump.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index 88ff63d..e8da1d5 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -390,9 +390,11 @@ Notes on loading the dump-capture kernel:
 * Boot parameter "1" boots the dump-capture kernel into single-user
   mode without networking. If you want networking, use "3".
 
-* We generally don' have to bring up a SMP kernel just to capture the
+* We generally don' have to bring up an 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 should replace it by 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
-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v8 0/2] update the doc of kdump

2016-08-17 Thread Zhou Wenjian
v7->v8: fix "a SMP kernel" to "an SMP kernel" and replace "\" with "/"
v6->v7: fix typo
v5->v6: replace "we" with "you"
v4->v5: move change log to cover letter
v3->v4: update the description of bring up SMP dump-capture kernel
v2->v3: add description of nr_cpus.
v1->v2: change nr_cpus to maxcpus

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

 Documentation/kdump/kdump.txt | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v8 2/2] Documentation: kdump: add description of enable multi-cpus support

2016-08-17 Thread Zhou Wenjian
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-f...@cn.fujitsu.com>
Acked-by: Baoquan He <b...@redhat.com>
Acked-by: Xunlei Pang <xp...@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 e8da1d5..c781d49 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 should replace it by 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
-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v7 0/2] update the doc of kdump

2016-08-17 Thread Zhou Wenjian
v6->v7: fix typo
v5->v6: replace "we" with "you"
v4->v5: move change log to cover letter
v3->v4: update the description of bring up SMP dump-capture kernel
v2->v3: add description of nr_cpus.
v1->v2: change nr_cpus to maxcpus


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

 Documentation/kdump/kdump.txt | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v7 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-17 Thread Zhou Wenjian
nr_cpus can help to save memory. So we should remind user of it.

Signed-off-by: Zhou Wenjian <zhouwj-f...@cn.fujitsu.com>
Acked-by: Baoquan He <b...@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..96da2b7 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 should replace it by 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
-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v7 2/2] Documentation: kdump: add description of enable multi-cpus support

2016-08-17 Thread Zhou Wenjian
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-f...@cn.fujitsu.com>
Acked-by: Baoquan He <b...@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 96da2b7..c93a6e0 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 should replace it by 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
+  a 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
-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v6 2/2] Documentation: kdump: add description of enable multi-cpus support

2016-08-14 Thread Zhou Wenjian
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-f...@cn.fujitsu.com>
Acked-by: Baoquan He <b...@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 96da2b7..c93a6e0 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 should replace it by 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
+  a SMP dump-capture kernel and specify maxcpus\nr_cpus, disable_cpu_apic=[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
-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v6 0/2] update the doc of kdump

2016-08-14 Thread Zhou Wenjian
v5->v6: replace "we" with "you"
v4->v5: move change log to cover letter
v3->v4: update the description of bring up SMP dump-capture kernel
v2->v3: add description of nr_cpus.
v1->v2: change nr_cpus to maxcpus


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

 Documentation/kdump/kdump.txt | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html