Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1617819

Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU mask

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU mask
Date 2017-04-06 11:50 +0200
Message-ID <ttcdc-6Oa-11@gated-at.bofh.it> (permalink)
References (2 earlier) <tsODU-f3-21@gated-at.bofh.it> <tt8VY-4N0-31@gated-at.bofh.it> <ttabo-5wO-27@gated-at.bofh.it> <ttaEq-5XA-9@gated-at.bofh.it> <ttc3w-6L0-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Apr 06, 2017 at 11:35:45AM +0200, Peter Zijlstra wrote:
> On Thu, Apr 06, 2017 at 10:01:39AM +0200, Ingo Molnar wrote:
> > I.e. just have a counter and these two APIs:
> > 
> >         static inline void migrate_disable(void)
> >         {
> >                 current->migration_disabled++;
> >         }
> > 
> >         ...
> > 
> >         static inline void migrate_enable(void)
> >         {
> >                 current->migration_disabled--;
> >         }
> > 
> > ... and make sure the scheduler migration code plus the CPU hotplug code considers 
> > the counter.
> > 
> > Would this work, and would this be the simplest all around solution?
> 
> If you want to add expensive bits to hot paths like wakeups ... :/

Hmm, doesn't that get us back to exactly where we were: ?

tsk_cpus_allowed() 
{
	if (!tsk->migration_disabled)
		return tsk->cpus_allowed;
	else
		return cpumask_of(task_cpu(tsk));
}

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] kernel: sched: Provide a pointer to the valid CPU mask Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-04-04 20:50 +0200
  Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Ingo Molnar <mingo@kernel.org> - 2017-04-05 09:40 +0200
    Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-04-05 10:40 +0200
      Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Ingo Molnar <mingo@kernel.org> - 2017-04-06 08:20 +0200
        Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-04-06 09:40 +0200
          Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Ingo Molnar <mingo@kernel.org> - 2017-04-06 10:10 +0200
            Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-04-06 11:30 +0200
              Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Peter Zijlstra <peterz@infradead.org> - 2017-04-06 11:50 +0200
                Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Thomas Gleixner <tglx@linutronix.de> - 2017-04-06 13:00 +0200
                Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Peter Zijlstra <peterz@infradead.org> - 2017-04-06 13:50 +0200
            Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Peter Zijlstra <peterz@infradead.org> - 2017-04-06 11:40 +0200
              Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Peter Zijlstra <peterz@infradead.org> - 2017-04-06 11:50 +0200
            Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Thomas Gleixner <tglx@linutronix.de> - 2017-04-06 12:40 +0200
              Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Ingo Molnar <mingo@kernel.org> - 2017-04-06 13:10 +0200
                Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Thomas Gleixner <tglx@linutronix.de> - 2017-04-06 13:20 +0200
                Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Ingo Molnar <mingo@kernel.org> - 2017-04-07 09:20 +0200
    Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Peter Zijlstra <peterz@infradead.org> - 2017-04-06 11:40 +0200
  Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Peter Zijlstra <peterz@infradead.org> - 2017-04-06 11:40 +0200
    Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-04-06 11:50 +0200
      Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Peter Zijlstra <peterz@infradead.org> - 2017-04-06 12:40 +0200
        Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Thomas Gleixner <tglx@linutronix.de> - 2017-04-06 12:50 +0200
          Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Peter Zijlstra <peterz@infradead.org> - 2017-04-06 13:00 +0200
            Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Thomas Gleixner <tglx@linutronix.de> - 2017-04-06 13:10 +0200
              Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Peter Zijlstra <peterz@infradead.org> - 2017-04-06 14:00 +0200
                Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Thomas Gleixner <tglx@linutronix.de> - 2017-04-06 14:00 +0200
                Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU  mask Peter Zijlstra <peterz@infradead.org> - 2017-04-06 14:40 +0200

csiph-web