Re: [RFC][PATCH] sched: Avoid select_idle_sibling() forwake_affine(.sync=true)

From: Peter Zijlstra
Date: Thu Sep 26 2013 - 06:05:24 EST


On Thu, Sep 26, 2013 at 11:58:12AM +0200, Peter Zijlstra wrote:
> @@ -3429,6 +3440,9 @@ select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags)
> int want_affine = 0;
> int sync = wake_flags & WF_SYNC;
>
> + if (sync)
> + p->se.last_sync_wakeup = sched_clock_cpu(cpu);
> +
> if (p->nr_cpus_allowed == 1)
> return prev_cpu;
>

Oh, I suppose something like:

if (sync && !p->se.last_sync_wakeup)
p->se.last_sync_wakeup = sched_clock_cpu(cpu);

is also a nice variation to try..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/