From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758534AbcCVMVU (ORCPT ); Tue, 22 Mar 2016 08:21:20 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:51081 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757881AbcCVMVC (ORCPT ); Tue, 22 Mar 2016 08:21:02 -0400 Date: Tue, 22 Mar 2016 13:20:50 +0100 From: Peter Zijlstra To: Heiko Carstens Cc: Davidlohr Bueso , tglx@linutronix.de, mingo@kernel.org, bigeasy@linutronix.de, umgwanakikbuti@gmail.com, paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, kmo@daterainc.com Subject: Re: [PATCH 4/3] rtmutex: Avoid barrier in rt_mutex_handle_deadlock Message-ID: <20160322122050.GM6344@twins.programming.kicks-ass.net> References: <1457461223-4301-1-git-send-email-dave@stgolabs.net> <20160308220539.GB4404@linux-uzut.site> <20160314134038.GZ6356@twins.programming.kicks-ass.net> <20160321181622.GB32012@linux-uzut.site> <20160322102153.GL6344@twins.programming.kicks-ass.net> <20160322113221.GA3921@osiris> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160322113221.GA3921@osiris> 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 On Tue, Mar 22, 2016 at 12:32:21PM +0100, Heiko Carstens wrote: > On Tue, Mar 22, 2016 at 11:21:53AM +0100, Peter Zijlstra wrote: > > And s390 does something entirely vile, no idea what. > > For the two s390 usages tsk equals current. So it could be easily replaced > with set_current_state(). Hmm indeed, I only saw tsk = find_task_by_pid_ns() and didn't look further, but you do indeed have an assertion later that ensures task == current. I still don't get that code though; why would you set the current task state to UNINTERRUPTIBLE, also set need_resched, but then not call schedule() at all. Clearly something magical is going on and its not clear.