lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50944873-5efb-ec73-19c9-918e3543b838@hisilicon.com>
Date:   Sat, 4 Dec 2021 14:47:42 +0800
From:   Yicong Yang <yangyicong@...ilicon.com>
To:     Tim Chen <tim.c.chen@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>
CC:     <yangyicong@...ilicon.com>,
        Arjan Van De Ven <arjan.van.de.ven@...el.com>,
        Ricardo Neri <ricardo.neri@...el.com>,
        Len Brown <len.brown@...el.com>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>,
        Chen Yu <yu.c.chen@...el.com>,
        Song Bao Hua <song.bao.hua@...ilicon.com>,
        yangyicong <yangyicong@...wei.com>,
        Michael Larabel <Michael@...haelLarabel.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/5] scheduler: Add boot time enabling/disabling of
 cluster scheduling

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ