[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170406094635.iwkaewsbiud35q6b@hirez.programming.kicks-ass.net>
Date: Thu, 6 Apr 2017 11:46:35 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Mike Galbraith <efault@....de>, Ingo Molnar <mingo@...e.hu>,
"Rafael J . Wysocki" <rjw@...ysocki.net>
Subject: Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU
mask
On Thu, Apr 06, 2017 at 11:25:42AM +0200, Sebastian Andrzej Siewior wrote:
> > I.e. just have a counter and these two APIs:
> >
> > static inline void migrate_disable(void)
> > {
> > current->migration_disabled++;
> plus
> if (current->migration_disabled == 1)
> get_online_cpus()
You want that other hotplug fast hack crap you have in rt, no? Because
mainline will not get anything other than prempt_disable() for
migrate_disable().
> > }
> >
> > ...
> >
> > static inline void migrate_enable(void)
> > {
> > current->migration_disabled--;
> > }
> >
> > ... and make sure the scheduler migration code plus the CPU hotplug code considers
> > the counter.
>
> So on the sched part I need go through all places where it looks at the
> mask and make sure it ignores the CPU switch decision. This could be
> doable.
Don't sprinkle that around. Use a wrapper like say: tsk_cpus_allowed()
to encapsulate that logic :-)
Powered by blists - more mailing lists