lkml.org 
[lkml]   [2019]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH v4 00/10] steal tasks to improve CPU utilization
From
Date
On 07/12/2018 20:30, Valentin Schneider wrote:
[...]
> ----->8-----
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 17ab4db..8b5172f 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -7152,7 +7152,8 @@ done: __maybe_unused;
> rq_idle_stamp_update(rq);
>
> new_tasks = idle_balance(rq, rf);
> - if (new_tasks == 0)
> + if (new_tasks == 0 &&
> + (!static_key_unlikely(&sched_energy_present) || READ_ONCE(rq->rd->overutilized))
> new_tasks = try_steal(rq, rf);
>
> if (new_tasks)
> -----8<-----
>

As a heads-up, that should now use sched_energy_enabled() [1], so that'd be:

-----8<-----
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f28df187db24..2eddb40fd368 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7134,7 +7134,8 @@ done: __maybe_unused;
rq_idle_stamp_update(rq);

new_tasks = idle_balance(rq, rf);
- if (new_tasks == 0)
+ if (new_tasks == 0 &&
+ (!sched_energy_enabled() || READ_ONCE(rq->rd->overutilized)))
new_tasks = try_steal(rq, rf);

if (new_tasks)
----->8-----
[1]: f8a696f25ba0 ("sched/core: Give DCE a fighting chance")

[...]

\
 
 \ /
  Last update: 2019-02-01 16:08    [W:0.264 / U:3.096 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site