Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754059AbbLTFqH (ORCPT ); Sun, 20 Dec 2015 00:46:07 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:36772 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbbLTFqE (ORCPT ); Sun, 20 Dec 2015 00:46:04 -0500 Date: Sat, 19 Dec 2015 21:46:02 -0800 From: Darren Hart To: Thomas Gleixner Cc: LKML , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , Bhuvanesh_Surachari@mentor.com, Andy Lowe Subject: Re: [patch 5/5] futex: Cleanup the goto confusion in requeue_pi() Message-ID: <20151220054602.GK7244@malice.jf.intel.com> References: <20151219200501.563704646@linutronix.de> <20151219200607.526665141@linutronix.de> <20151220051524.GH7244@malice.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151220051524.GH7244@malice.jf.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1166 Lines: 31 On Sat, Dec 19, 2015 at 09:15:24PM -0800, Darren Hart wrote: > > As a follow-on, I think it might be worthwhile to create a symmetrical > get_pi_state() to the put_pi_state(), rather than handling the atomic_inc > directly. > > And finally, while the break; in futex_requeue works, that function is quite > long and an explicit out_put_pi_state: label would make the intention clear and > also avoid inadvertently breaking the implicit behavior of the break. > And while prototyping these changes, I've changed my mind, neither is a worthwhile change. The plist_for_each in futex_requeue really isn't that long and the breaks occur in a logical way and are now well documented with this series. An inadvertent change to this behavior seems unlikely. There is only one open coded atomic_inc in futex.c for the pi_state refcount, hardly worth a wrapper. Regards, -- Darren Hart Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/