[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170209085134.GY6500@twins.programming.kicks-ass.net>
Date: Thu, 9 Feb 2017 09:51:34 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Mike Galbraith <efault@....de>, Ingo Molnar <mingo@...e.hu>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: tip: demise of tsk_cpus_allowed() and tsk_nr_cpus_allowed()
On Thu, Feb 09, 2017 at 07:57:27AM +0100, Ingo Molnar wrote:
> And -rt would do something like this in migration_disable()/enable():
>
> t->cpus_ptr = &cpumask_of(task_cpu(p));
> t->nr_cpus = 1;
>
> ...
>
> t->cpus_ptr = &t->cpus_mask;
> t->nr_cpus = cpumask_weight(t->cpus_mask);
>
> In addition to that we could cache the weight of the cpumask as an additional
> optimization:
>
> t->cpus_ptr = &t->cpus_mask;
> t->nr_cpus = t->cpus_mask_weight;
>
> It all looks like a pretty natural construct to me. The migration_disabled() flag
> spreads almost a hundred branches all across the scheduler.
Could work I suppose. But please then implement this instead of ripping
out the current thing, because taking out the accessors leaves RT in a
bind without recourse.
Powered by blists - more mailing lists