From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932724AbcEXQ6K (ORCPT ); Tue, 24 May 2016 12:58:10 -0400 Received: from merlin.infradead.org ([205.233.59.134]:43226 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752485AbcEXQ6I (ORCPT ); Tue, 24 May 2016 12:58:08 -0400 Date: Tue, 24 May 2016 18:57:41 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Linux Kernel Mailing List , Manfred Spraul , Davidlohr Bueso , Paul McKenney , Will Deacon , Boqun Feng , Waiman Long , Tejun Heo , Pablo Neira Ayuso , Patrick McHardy , David Miller , Oleg Nesterov , netfilter-devel@vger.kernel.org, Sasha Levin , hofrat@osadl.org Subject: Re: [RFC][PATCH 2/3] locking: Annotate spin_unlock_wait() users Message-ID: <20160524165741.GB15189@worktop.bitpit.net> References: <20160524142723.178148277@infradead.org> <20160524143649.608476390@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 24, 2016 at 09:17:13AM -0700, Linus Torvalds wrote: > This needs to be either hidden inside the basic spinlock functions, > _or_ it needs to be a clear and unambiguous interface. Anything that > starts talking about control dependencies is not it. > > Note that this really is about naming and use, not about > implementation. So something like "spin_sync_after_unlock_wait()" is > acceptable, even if the actual _implementation_ were to be exactly the > same as the "after_ctrl_dep()" crap. OK; so I would prefer to keep the smp_acquire__after_ctrl_dep() crap for common use in smp_cond_acquire() and such, but I'd be more than happy to just stuff it unconditionally into spin_unlock_wait(). Most users really need it, and its restores intuitive semantics to the primitive. I'm assuming the explicit use then left in ipc/sem.c (as paired with the spin_is_locked) is fine with you; that's certainly not driver code. Todays series was really more about auditing all the spin_unlock_wait() usage sites.