lkml.org 
[lkml]   [2020]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [RFC] sched: restrict iowait boost for boosted task only
On 01/25/20 23:59, Qais Yousef wrote:
> diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> index 9b8916fd00a2..a76c02eecdaf 100644
> --- a/kernel/sched/cpufreq_schedutil.c
> +++ b/kernel/sched/cpufreq_schedutil.c
> @@ -421,7 +421,8 @@ static unsigned long sugov_iowait_apply(struct sugov_cpu *sg_cpu, u64 time,
> * into the same scale so we can compare.
> */
> boost = (sg_cpu->iowait_boost * max) >> SCHED_CAPACITY_SHIFT;
> - return max(boost, util);
> + boost = max(boost, util);
> + return uclamp_util_with(cpu_rq(sg_cpu->cpu), boost, NULL);
> }
>
> #ifdef CONFIG_NO_HZ_COMMON

Forgot to mention this will work if the background task is the only task
running on this CPU. Like Quentin already pointed out, the iowait_boost might
need more massaging to allow finer per task control.

--
Qais Yousef

\
 
 \ /
  Last update: 2020-01-26 01:26    [W:0.036 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site