From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753703AbbBXRuW (ORCPT ); Tue, 24 Feb 2015 12:50:22 -0500 Received: from mail-wi0-f177.google.com ([209.85.212.177]:33956 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753273AbbBXRuU (ORCPT ); Tue, 24 Feb 2015 12:50:20 -0500 Message-ID: <1424800214.6955.30.camel@gmail.com> Subject: Re: [ANNOUNCE] 3.18.7-rt2 From: Mike Galbraith To: Gustavo Bittencourt Cc: Sebastian Andrzej Siewior , linux-rt-users , LKML , Thomas Gleixner , rostedt@goodmis.org, John Kacur Date: Tue, 24 Feb 2015 18:50:14 +0100 In-Reply-To: References: <20150223090617.GA26453@linutronix.de> <1424785301.8767.11.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2015-02-24 at 13:19 -0300, Gustavo Bittencourt wrote: > On Tue, Feb 24, 2015 at 10:41 AM, Mike Galbraith > wrote: > > locking, ww_mutex: fix ww_mutex vs self-deadlock > > > > If the caller already holds the mutex, task_blocks_on_rt_mutex() > > returns -EDEADLK, we proceed directly to rt_mutex_handle_deadlock() > > where it's instant game over. > > > > Let ww_mutexes return EDEADLK/EALREADY as they want to instead. > > > > Signed-off-by: Mike Galbraith > > --- > > kernel/locking/rtmutex.c | 17 +++++++++++------ > > 1 file changed, 11 insertions(+), 6 deletions(-) > > > > --- a/kernel/locking/rtmutex.c > > +++ b/kernel/locking/rtmutex.c > > The deadlock returned after I applied this patch in v3.18.7-rt2. Here is my log: Hrmph. I definitely want your patch to die ;-) It adds a whole new dimension to ww_mutex that only now exists in -rt. That's not good. My patchlet may not be perfect either, but it lets ww_mutex do that return EALREADY business it's supposed to, vs going straight to while(1). We can't have it both ways, so I suppose I'll fire up my old Q6600 box (that doesn't have annoying GTX980 that my userspace can't deal with DRM wise), and see if I can chase the nouveau thing down. I'm not all that enthusiastic though, as there are or at least were other issues with nouveau. Sebastian reported some completely _missing_ locking IIRC, that led to his box exploding. -Mike