From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Galbraith Subject: Re: [PATCH RT] rt,ipc,sem: fix -rt livelock Date: Fri, 13 Sep 2013 05:20:21 +0200 Message-ID: <1379042421.5455.47.camel@marge.simpson.net> References: <20130819213324.405942342@goodmis.org> <1377842245.5422.7.camel@marge.simpson.net> <1377873580.5422.25.camel@marge.simpson.net> <1377926850.6234.22.camel@marge.simpson.net> <1378451338.5434.91.camel@marge.simpson.net> <1378794614.6046.37.camel@marge.simpson.net> <52307814.4020104@colorfullife.com> <1378971628.10696.88.camel@marge.simpson.net> <20130912151547.389673d2@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Manfred Spraul , linux-rt-users , Thomas Gleixner , Sebastian Andrzej Siewior , Peter Zijlstra To: Steven Rostedt Return-path: Received: from moutng.kundenserver.de ([212.227.17.10]:49899 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533Ab3IMDU0 (ORCPT ); Thu, 12 Sep 2013 23:20:26 -0400 In-Reply-To: <20130912151547.389673d2@gandalf.local.home> Sender: linux-rt-users-owner@vger.kernel.org List-ID: On Thu, 2013-09-12 at 15:15 -0400, Steven Rostedt wrote: > On Thu, 12 Sep 2013 09:40:28 +0200 > Mike Galbraith wrote: > > > > If maintainers are interested, I can add that and clean up hammer marks > > so it can be applied in lieu of the existing rt wakeup patch instead of > > being crammed in on top of it, or they can trivially do that themselves, > > both options presuming your (implied) approval. > > > > Mike, > > What's the final patch for this? Both loop removal patch or something like it (but prettier), and Manfred's wakeup scheme to prevent the locked array lock being being seen and reacted to by wakees, who can then contend on that lock, defeating the whole purpose for a while. > Could you post another one with what you believe is the correct fix. As noted, I _think_ they're both needed. Manfred's wakeup scheme cures a trigger, but not the bug methinks (non-deterministic trylock loop). Would be nice if it turned out that it cured all possible livelocks, but I don't think it does. Even if it did, crawling over a large array always taking and releasing every lock will suck, which is why I did the look at it before taking it thing. That ain't pretty, but it's less painful. -Mike