Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756307AbcCQHgP (ORCPT ); Thu, 17 Mar 2016 03:36:15 -0400 Received: from casper.infradead.org ([85.118.1.10]:52758 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753414AbcCQHgK (ORCPT ); Thu, 17 Mar 2016 03:36:10 -0400 Date: Thu, 17 Mar 2016 08:36:05 +0100 From: Peter Zijlstra To: Steven Rostedt Cc: Joel Fernandes , Greg Kroah-Hartman , linux-rt-users@vger.kernel.org, Linux Kernel Mailing List , kernelnewbies , Ingo Molnar , Thomas Gleixner Subject: Re: RFC on fixing mutex spinning on owner Message-ID: <20160317073605.GM6344@twins.programming.kicks-ass.net> References: <20160316233530.GA8731@kroah.com> <20160316221751.71816309@grimm.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160316221751.71816309@grimm.local.home> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 642 Lines: 21 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.