linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] Documentation: scheduler: fix outdated information on arch SD flags and sched_domain
@ 2020-11-12 22:31 Barry Song
  2020-11-12 22:31 ` [PATCH v2 2/2] Documentation: scheduler: ask users to set sched_debug cmdline Barry Song
  0 siblings, 1 reply; 4+ messages in thread
From: Barry Song @ 2020-11-12 22:31 UTC (permalink / raw)
  To: corbet, linux-doc, linux-kernel
  Cc: linuxarm, Barry Song, Ingo Molnar, Peter Zijlstra, Mel Gorman,
	Adrian Freund, Valentin Schneider

This document seems to be out of date for many, many years. Even it has
misspelled from the first day.
ARCH_HASH_SCHED_TUNE should be ARCH_HAS_SCHED_TUNE
ARCH_HASH_SCHED_DOMAIN should be ARCH_HAS_SCHED_DOMAIN

Since v2.6.14, kernel completely deleted the relevant code and even
arch_init_sched_domains() was deleted.

Right now, kernel is asking architectures to call set_sched_topology() to
override the default sched domains.

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Adrian Freund <adrian@freund.io>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
---
 -v2: refine the SD_ flags description with respect to Valentin's comment

 Documentation/scheduler/sched-domains.rst | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/Documentation/scheduler/sched-domains.rst b/Documentation/scheduler/sched-domains.rst
index 5c4b7f4f0062..55983b7e1098 100644
--- a/Documentation/scheduler/sched-domains.rst
+++ b/Documentation/scheduler/sched-domains.rst
@@ -65,19 +65,13 @@ of the SMP domain will span the entire machine, with each group having the
 cpumask of a node. Or, you could do multi-level NUMA or Opteron, for example,
 might have just one domain covering its one NUMA level.
 
-The implementor should read comments in include/linux/sched.h:
-struct sched_domain fields, SD_FLAG_*, SD_*_INIT to get an idea of
-the specifics and what to tune.
+The implementor should read comments in include/linux/sched/sd_flags.h:
+SD_* to get an idea of the specifics and what to tune for the SD flags
+of a sched_domain.
 
-Architectures may retain the regular override the default SD_*_INIT flags
-while using the generic domain builder in kernel/sched/core.c if they wish to
-retain the traditional SMT->SMP->NUMA topology (or some subset of that). This
-can be done by #define'ing ARCH_HASH_SCHED_TUNE.
-
-Alternatively, the architecture may completely override the generic domain
-builder by #define'ing ARCH_HASH_SCHED_DOMAIN, and exporting your
-arch_init_sched_domains function. This function will attach domains to all
-CPUs using cpu_attach_domain.
+Architectures may override the generic domain builder and the default SD flags
+for a given topology level by creating a sched_domain_topology_level array and
+calling set_sched_topology() with this array as the parameter.
 
 The sched-domains debugging infrastructure can be enabled by enabling
 CONFIG_SCHED_DEBUG. This enables an error checking parse of the sched domains
-- 
2.25.1


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

* [PATCH v2 2/2] Documentation: scheduler: ask users to set sched_debug cmdline
  2020-11-12 22:31 [PATCH v2 1/2] Documentation: scheduler: fix outdated information on arch SD flags and sched_domain Barry Song
@ 2020-11-12 22:31 ` Barry Song
  2020-11-13 11:34   ` Valentin Schneider
  0 siblings, 1 reply; 4+ messages in thread
From: Barry Song @ 2020-11-12 22:31 UTC (permalink / raw)
  To: corbet, linux-doc, linux-kernel
  Cc: linuxarm, Valentin Schneider, Ingo Molnar, Peter Zijlstra,
	Mel Gorman, Adrian Freund, Barry Song

From: Valentin Schneider <valentin.schneider@arm.com>

To print the schedule debug information, users need to set sched_debug
cmdline or enable it by sysfs entry.

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Adrian Freund <adrian@freund.io>
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
---
 Documentation/scheduler/sched-domains.rst | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Documentation/scheduler/sched-domains.rst b/Documentation/scheduler/sched-domains.rst
index 55983b7e1098..8582fa5e9170 100644
--- a/Documentation/scheduler/sched-domains.rst
+++ b/Documentation/scheduler/sched-domains.rst
@@ -74,6 +74,8 @@ for a given topology level by creating a sched_domain_topology_level array and
 calling set_sched_topology() with this array as the parameter.
 
 The sched-domains debugging infrastructure can be enabled by enabling
-CONFIG_SCHED_DEBUG. This enables an error checking parse of the sched domains
-which should catch most possible errors (described above). It also prints out
-the domain structure in a visual format.
+CONFIG_SCHED_DEBUG and adding 'sched_debug' to your cmdline. If you forgot to
+tweak your cmdline, you can also flip the /sys/kernel/debug/sched_debug
+knob. This enables an error checking parse of the sched domains which should
+catch most possible errors (described above). It also prints out the domain
+structure in a visual format.
-- 
2.25.1


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

* Re: [PATCH v2 2/2] Documentation: scheduler: ask users to set sched_debug cmdline
  2020-11-12 22:31 ` [PATCH v2 2/2] Documentation: scheduler: ask users to set sched_debug cmdline Barry Song
@ 2020-11-13 11:34   ` Valentin Schneider
  2020-11-13 11:41     ` Song Bao Hua (Barry Song)
  0 siblings, 1 reply; 4+ messages in thread
From: Valentin Schneider @ 2020-11-13 11:34 UTC (permalink / raw)
  To: Barry Song
  Cc: corbet, linux-doc, linux-kernel, linuxarm, Ingo Molnar,
	Peter Zijlstra, Mel Gorman, Adrian Freund


On 12/11/20 22:31, Barry Song wrote:
> From: Valentin Schneider <valentin.schneider@arm.com>
>
> To print the schedule debug information, users need to set sched_debug
> cmdline or enable it by sysfs entry.
>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Adrian Freund <adrian@freund.io>
> Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>

FYI, forging SoB, or any 'tag' other than Suggested-by / Reported-by is
frowned up. Now I do appreciate your effort to give me credit, but in this
case you should've used Suggested-by.

Moreso, this really is a trivial change and doesn't deserve a separate
patch, so I would say just squash that into patch 1, and add

Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>

to it :)

> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
> ---
>  Documentation/scheduler/sched-domains.rst | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/scheduler/sched-domains.rst b/Documentation/scheduler/sched-domains.rst
> index 55983b7e1098..8582fa5e9170 100644
> --- a/Documentation/scheduler/sched-domains.rst
> +++ b/Documentation/scheduler/sched-domains.rst
> @@ -74,6 +74,8 @@ for a given topology level by creating a sched_domain_topology_level array and
>  calling set_sched_topology() with this array as the parameter.
>  
>  The sched-domains debugging infrastructure can be enabled by enabling
> -CONFIG_SCHED_DEBUG. This enables an error checking parse of the sched domains
> -which should catch most possible errors (described above). It also prints out
> -the domain structure in a visual format.
> +CONFIG_SCHED_DEBUG and adding 'sched_debug' to your cmdline. If you forgot to
> +tweak your cmdline, you can also flip the /sys/kernel/debug/sched_debug
> +knob. This enables an error checking parse of the sched domains which should
> +catch most possible errors (described above). It also prints out the domain
> +structure in a visual format.


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

* RE: [PATCH v2 2/2] Documentation: scheduler: ask users to set sched_debug cmdline
  2020-11-13 11:34   ` Valentin Schneider
@ 2020-11-13 11:41     ` Song Bao Hua (Barry Song)
  0 siblings, 0 replies; 4+ messages in thread
From: Song Bao Hua (Barry Song) @ 2020-11-13 11:41 UTC (permalink / raw)
  To: Valentin Schneider
  Cc: corbet, linux-doc, linux-kernel, Linuxarm, Ingo Molnar,
	Peter Zijlstra, Mel Gorman, Adrian Freund



> -----Original Message-----
> From: Valentin Schneider [mailto:valentin.schneider@arm.com]
> Sent: Saturday, November 14, 2020 12:34 AM
> To: Song Bao Hua (Barry Song) <song.bao.hua@hisilicon.com>
> Cc: corbet@lwn.net; linux-doc@vger.kernel.org; linux-kernel@vger.kernel.org;
> Linuxarm <linuxarm@huawei.com>; Ingo Molnar <mingo@redhat.com>; Peter
> Zijlstra <peterz@infradead.org>; Mel Gorman <mgorman@suse.de>; Adrian
> Freund <adrian@freund.io>
> Subject: Re: [PATCH v2 2/2] Documentation: scheduler: ask users to set
> sched_debug cmdline
> 
> 
> On 12/11/20 22:31, Barry Song wrote:
> > From: Valentin Schneider <valentin.schneider@arm.com>
> >
> > To print the schedule debug information, users need to set sched_debug
> > cmdline or enable it by sysfs entry.
> >
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Mel Gorman <mgorman@suse.de>
> > Cc: Adrian Freund <adrian@freund.io>
> > Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
> 
> FYI, forging SoB, or any 'tag' other than Suggested-by / Reported-by is
> frowned up. Now I do appreciate your effort to give me credit, but in this
> case you should've used Suggested-by.

As this part is actually your code, so I put an --author=" Valentin ..." in
git commit so that git can show you are the author. Actually I was not
sure if SoB was proper when I made it. My intention was only telling
people the code was from you :-)

> 
> Moreso, this really is a trivial change and doesn't deserve a separate
> patch, so I would say just squash that into patch 1, and add
> 
> Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
> 
> to it :)

Cool, thanks.

> 
> > Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
> > ---
> >  Documentation/scheduler/sched-domains.rst | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/Documentation/scheduler/sched-domains.rst
> b/Documentation/scheduler/sched-domains.rst
> > index 55983b7e1098..8582fa5e9170 100644
> > --- a/Documentation/scheduler/sched-domains.rst
> > +++ b/Documentation/scheduler/sched-domains.rst
> > @@ -74,6 +74,8 @@ for a given topology level by creating a
> sched_domain_topology_level array and
> >  calling set_sched_topology() with this array as the parameter.
> >
> >  The sched-domains debugging infrastructure can be enabled by enabling
> > -CONFIG_SCHED_DEBUG. This enables an error checking parse of the sched
> domains
> > -which should catch most possible errors (described above). It also prints out
> > -the domain structure in a visual format.
> > +CONFIG_SCHED_DEBUG and adding 'sched_debug' to your cmdline. If you
> forgot to
> > +tweak your cmdline, you can also flip the /sys/kernel/debug/sched_debug
> > +knob. This enables an error checking parse of the sched domains which
> should
> > +catch most possible errors (described above). It also prints out the domain
> > +structure in a visual format.

Thanks
Barry


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

end of thread, other threads:[~2020-11-13 12:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 22:31 [PATCH v2 1/2] Documentation: scheduler: fix outdated information on arch SD flags and sched_domain Barry Song
2020-11-12 22:31 ` [PATCH v2 2/2] Documentation: scheduler: ask users to set sched_debug cmdline Barry Song
2020-11-13 11:34   ` Valentin Schneider
2020-11-13 11:41     ` Song Bao Hua (Barry Song)

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