Re: [PATCH RFC/TEST] sched: make sync affine wakeups work

From: Rik van Riel
Date: Thu May 08 2014 - 22:21:03 EST


On 05/06/2014 04:39 PM, Peter Zijlstra wrote:
> On Tue, May 06, 2014 at 04:19:21PM -0400, Rik van Riel wrote:
>> On 05/06/2014 07:54 AM, Peter Zijlstra wrote:
>>> On Fri, May 02, 2014 at 11:19:47AM -0400, Rik van Riel wrote:
>>>> As an aside, it also looks like SD_BALANCE_WAKE is set on all domains
> ^^^^^^^^^^^^^^^

> No BALANCE_WAKE there

Looks like SD_BALANCE_WAKE is not gotten from the sd flags at
all, but passed into select_task_rq by try_to_wake_up, as a
hard coded sd_flags argument.

static int
try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
{
...
cpu = select_task_rq(p, p->wake_cpu, SD_BALANCE_WAKE, wake_flags);
...

static inline
int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int
wake_flags)
{
cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags);
...

static int
select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag,
int wake_flags)
{
...

if (sd_flag & SD_BALANCE_WAKE) {
if (cpumask_test_cpu(cpu, tsk_cpus_allowed(p)))
want_affine = 1;
new_cpu = prev_cpu;
}

Should we do that, if SD_WAKE_BALANCE is not set for any sched domain?

--
All rights reversed
--
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/