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] [day] [month] [year] [list]
Date:   Wed, 9 Feb 2022 20:22:48 +0530
From:   Chitti Babu Theegala <quic_ctheegal@...cinc.com>
To:     Vincent Donnefort <vincent.donnefort@....com>
CC:     <mingo@...hat.com>, <peterz@...radead.org>,
        <juri.lelli@...hat.com>, <vincent.guittot@...aro.org>,
        <dietmar.eggemann@....com>, <rostedt@...dmis.org>,
        <joel@...lfernandes.org>, <linux-arm-msm@...r.kernel.org>,
        <quic_lingutla@...cinc.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched/uclamp: New sysctl to tweak boost for uclamp tasks


Sorry, please ignore this patch. It was wrongly uploaded here.
Will pursue this to right tree.

On 2/9/2022 7:29 PM, Vincent Donnefort wrote:
> [...]
> 
>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
>> index 634d571e39d77..55019eb9c83c5 100644
>> --- a/kernel/sched/core.c
>> +++ b/kernel/sched/core.c
>> @@ -1269,6 +1269,14 @@ unsigned int sysctl_sched_uclamp_util_max = SCHED_CAPACITY_SCALE;
>>    */
>>   unsigned int sysctl_sched_uclamp_util_min_rt_default = SCHED_CAPACITY_SCALE;
>>   
>> +/* UCLAMP_MIN knob clamps the util_value within uclamp_min & max. By default,
>> + * these uclamped tasks are also boosted to bigger cores which can impact power.
>> + *
>> + * This knob provides an option to turn-off 'boosting to gold cores' and
>> + * just restrict to 'clamping util value' job.
>> + */
>> +unsigned int sysctl_sched_uclamp_util_min_to_boost = 1;
>> +
>>   /* All clamps are required to be less or equal than these values */
>>   static struct uclamp_se uclamp_default[UCLAMP_CNT];
>>   
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 7cd316793f4e3..44adcbfa9eb32 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -6829,7 +6829,7 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy
>>   		goto unlock;
>>   
>>   	latency_sensitive = uclamp_latency_sensitive(p);
> 
> I don't think this is the right tree.

Thanks ! I just noticed it :-(

> 
> 
>> -	boosted = uclamp_boosted(p);
>> +	boosted = sysctl_sched_uclamp_util_min_to_boost && uclamp_boosted(p);
>>   	target_cap = boosted ? 0 : ULONG_MAX;
>>   
>>   	for (; pd; pd = pd->next) {
>> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
>> index 8f196ed2ec065..6463d60fed84e 100644
>> --- a/kernel/sysctl.c
>> +++ b/kernel/sysctl.c
>> @@ -1882,6 +1882,15 @@ static struct ctl_table kern_table[] = {
>>   		.mode		= 0644,
>>   		.proc_handler	= sysctl_sched_uclamp_handler,
>>   	},
>> +	{
>> +		.procname	= "sched_util_clamp_min_to_boost",
>> +		.data		= &sysctl_sched_uclamp_util_min_to_boost,
>> +		.maxlen		= sizeof(unsigned int),
>> +		.mode		= 0644,
>> +		.proc_handler	= proc_dointvec_minmax,
>> +		.extra1		= SYSCTL_ZERO,
>> +		.extra2		= SYSCTL_ONE,
>> +	},
>>   #endif
>>   #ifdef CONFIG_SCHED_AUTOGROUP
>>   	{
>> -- 
>> 2.17.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ