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


Groups > linux.kernel > #1359610

Re: RFC on fixing mutex spinning on owner

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: RFC on fixing mutex spinning on owner
Date 2016-03-17 08:40 +0100
Message-ID <rdAHg-4j7-7@gated-at.bofh.it> (permalink)
References <rdt34-7Be-37@gated-at.bofh.it> <rdtcK-7ER-13@gated-at.bofh.it> <rdtcK-7ER-27@gated-at.bofh.it> <rdvHA-UH-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 16, 2016 at 10:17:51PM -0400, Steven Rostedt wrote:
> Actually, the preempt off section here is not really an issue:
> 
> 	rcu_read_lock();
> 	while (owner_running(lock, owner)) {
> 		if (need_resched())
> 			break;
> 
> 		cpu_relax_lowlatency();
> 	}
> 	rcu_read_unlock();
> 
> Although preemption may be disabled, that "need_resched()" check will
> break out of the loop if a higher priority task were to want to run on
> this CPU.
> 
> I probably should add a hook there to let the preemptoff tracer know
> that this is not an issue.

Urgh, there's a lot of such spin loops all over, that's going to be a
pain to annotate all.

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


Thread

RFC on fixing mutex spinning on owner Joel Fernandes <agnel.joel@gmail.com> - 2016-03-17 00:30 +0100
  Re: RFC on fixing mutex spinning on owner Greg Kroah-Hartman <greg@kroah.com> - 2016-03-17 00:40 +0100
    Re: RFC on fixing mutex spinning on owner Joel Fernandes <agnel.joel@gmail.com> - 2016-03-17 00:40 +0100
      Re: RFC on fixing mutex spinning on owner Steven Rostedt <rostedt@goodmis.org> - 2016-03-17 03:20 +0100
        Re: RFC on fixing mutex spinning on owner Joel Fernandes <agnel.joel@gmail.com> - 2016-03-17 06:40 +0100
          Re: RFC on fixing mutex spinning on owner Steven Rostedt <rostedt@goodmis.org> - 2016-03-17 13:10 +0100
        Re: RFC on fixing mutex spinning on owner Peter Zijlstra <peterz@infradead.org> - 2016-03-17 08:40 +0100
          Re: RFC on fixing mutex spinning on owner Nicholas Mc Guire <der.herr@hofr.at> - 2016-03-17 10:10 +0100
            Re: RFC on fixing mutex spinning on owner Peter Zijlstra <peterz@infradead.org> - 2016-03-17 11:20 +0100
              Re: RFC on fixing mutex spinning on owner Thomas Gleixner <tglx@linutronix.de> - 2016-03-17 12:20 +0100
                Re: RFC on fixing mutex spinning on owner Steven Rostedt <rostedt@goodmis.org> - 2016-03-17 13:10 +0100
                Re: RFC on fixing mutex spinning on owner Peter Zijlstra <peterz@infradead.org> - 2016-03-17 13:20 +0100
                Re: RFC on fixing mutex spinning on owner Thomas Gleixner <tglx@linutronix.de> - 2016-03-17 14:40 +0100
                Re: RFC on fixing mutex spinning on owner Nicholas Mc Guire <der.herr@hofr.at> - 2016-03-17 17:50 +0100

csiph-web