lkml.org 
[lkml]   [2017]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 3/4] sched: Comment on why sync wakeups try to run on the current CPU
On Mon, Dec 18, 2017 at 09:43:26AM +0000, Mel Gorman wrote:
> The sync wakeup logic in wake_affine_idle deserves a short description.
>
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
> ---
> kernel/sched/fair.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 392e08b364bd..95b1145bc38d 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5737,6 +5737,11 @@ wake_affine_idle(int this_cpu, int prev_cpu, int sync)
> static int
> wake_affine_sync(int this_cpu, int sync)
> {
> + /*
> + * Consider stacking tasks if it's a sync wakeup and there is only
> + * one task on the runqueue. sync wakesups are expected to sleep
> + * either immediately or shortly after the wakeup.
> + */
> if (sync && cpu_rq(this_cpu)->nr_running == 1)
> return this_cpu;
>

So I don't think this one is over the top -- it went missing from the
last posting, but I agree with Mike that 4/4 was somewhat dodgy.

Our SYNC hint does promise the caller will go away 'soon', although I'm
not sure how many of the current users actually honor that.

In any case, picked up the one new patch, thanks for the giant changelog
;-)

\
 
 \ /
  Last update: 2017-12-19 20:07    [W:0.133 / U:2.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site