Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935173AbcCQCR4 (ORCPT ); Wed, 16 Mar 2016 22:17:56 -0400 Received: from smtprelay0172.hostedemail.com ([216.40.44.172]:38163 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754802AbcCQCRz (ORCPT ); Wed, 16 Mar 2016 22:17:55 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1183:1260:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3874:4362:4411:5007:6120:6226:6261:7514:7875:7901:10004:10400:10848:10967:11026:11232:11658:11914:12438:12517:12519:12663:12740:13069:13311:13357:13439:14096:14097:14659:14721:21080:30054:30060:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: pie50_a9058d259e10 X-Filterd-Recvd-Size: 2277 Date: Wed, 16 Mar 2016 22:17:51 -0400 From: Steven Rostedt To: Joel Fernandes Cc: Greg Kroah-Hartman , linux-rt-users@vger.kernel.org, Linux Kernel Mailing List , kernelnewbies , Ingo Molnar , Peter Zijlstra , Thomas Gleixner Subject: Re: RFC on fixing mutex spinning on owner Message-ID: <20160316221751.71816309@grimm.local.home> In-Reply-To: References: <20160316233530.GA8731@kroah.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 33 On Wed, 16 Mar 2016 16:38:56 -0700 Joel Fernandes wrote: > I am not sure if the problem is with the i915 driver, because the > mutex spin on owner stuff is mutex related so the mutex design may > potentially need a tweak (I mentioned a proposal of adding mutex > spinning time outs). > Also since this is latency issue related (I mentioned preemptoff > tracer and preempt disabled), I sent it to linux-rt-users. Thanks for > the tip about sending it to i915 developers, incase no one here has a > say in the matter, I can drop them a note later as well. 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. Thanks for the report. -- Steve