All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yicong Yang <yangyicong@hisilicon.com>
To: Tim Chen <tim.c.chen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: <yangyicong@hisilicon.com>,
	Arjan Van De Ven <arjan.van.de.ven@intel.com>,
	Ricardo Neri <ricardo.neri@intel.com>,
	Len Brown <len.brown@intel.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
	Chen Yu <yu.c.chen@intel.com>,
	Song Bao Hua <song.bao.hua@hisilicon.com>,
	yangyicong <yangyicong@huawei.com>,
	Michael Larabel <Michael@MichaelLarabel.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/5] scheduler: Add boot time enabling/disabling of cluster scheduling
Date: Sat, 4 Dec 2021 14:47:42 +0800	[thread overview]
Message-ID: <50944873-5efb-ec73-19c9-918e3543b838@hisilicon.com> (raw)
In-Reply-To: <41bf195de9d387ea58c030aec4eaaa8686c9cbb1.1638563225.git.tim.c.chen@linux.intel.com>

Hi Tim,

On 2021/12/4 4:32, Tim Chen wrote:
> Add boot time parameter sched_cluster to enable or disable cluster
> scheduling.  Set boot parameter as follow:
> 
> 	sched_cluster=0 disables cluster scheduling
> 	sched_cluster=1 enables cluster scheduling
> 
> Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
> ---
>  Documentation/admin-guide/kernel-parameters.txt |  4 ++++
>  kernel/sched/topology.c                         | 16 ++++++++++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 9725c546a0d4..40ad997430e1 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -5023,6 +5023,10 @@
>  
>  	sched_verbose	[KNL] Enables verbose scheduler debug messages.
>  
> +	sched_cluster=  Enable or disable cluster scheduling.
> +			0 -- disable.
> +			1 -- enable.
> +

One minor question here. We use 0|1 for sched_cluster here, but "enable" or
"disable" for schedstats below. Should we keep consistent?

>  	schedstats=	[KNL,X86] Enable or disable scheduled statistics.
>  			Allowed values are enable and disable. This feature
>  			incurs a small amount of overhead in the scheduler
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index e362bba29f95..087854d505f7 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -1697,6 +1697,22 @@ int sched_cluster_handler(struct ctl_table *table, int write,
>  
>  	return ret;
>  }
> +
> +static int __init sched_cluster_option(char *str)
> +{
> +	int enable;
> +
> +	if (get_option(&str, &enable)) {
> +		if (enable != 0 && enable != 1)
> +			return -EINVAL;
> +
> +		sysctl_sched_cluster = enable;
> +		return 0;
> +	}
> +
> +	return -EINVAL;
> +}
> +early_param("sched_cluster", sched_cluster_option);
>  #endif
>  
>  static struct sched_domain_topology_level *next_tl(struct sched_domain_topology_level *tl)
> 

  reply	other threads:[~2021-12-04  6:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 20:32 [PATCH 0/5] Make Cluster Scheduling Configurable Tim Chen
2021-12-03 20:32 ` [PATCH 1/5] scheduler: Create SDTL_SKIP flag to skip topology level Tim Chen
2021-12-03 20:32 ` [PATCH 2/5] scheduler: Add SD_CLUSTER topology flag to cluster sched domain Tim Chen
2021-12-03 20:32 ` [PATCH 3/5] scheduler: Add runtime knob sysctl_sched_cluster Tim Chen
2021-12-03 20:32 ` [PATCH 4/5] scheduler: Add boot time enabling/disabling of cluster scheduling Tim Chen
2021-12-04  6:47   ` Yicong Yang [this message]
2021-12-03 20:32 ` [PATCH 5/5] scheduler: Default cluster scheduling to off on x86 hybrid CPU Tim Chen
2021-12-04  9:14 ` [PATCH 0/5] Make Cluster Scheduling Configurable Peter Zijlstra
2021-12-06 18:42   ` Tim Chen
2021-12-06 22:05   ` Ricardo Neri
2021-12-07 15:49   ` Tim Chen
2021-12-08 21:27   ` [tip: sched/urgent] sched,x86: Don't use cluster topology for x86 hybrid CPUs tip-bot2 for Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50944873-5efb-ec73-19c9-918e3543b838@hisilicon.com \
    --to=yangyicong@hisilicon.com \
    --cc=Michael@MichaelLarabel.com \
    --cc=arjan.van.de.ven@intel.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=ricardo.neri@intel.com \
    --cc=song.bao.hua@hisilicon.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=yangyicong@huawei.com \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.