From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760283AbcJRNDH (ORCPT ); Tue, 18 Oct 2016 09:03:07 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:47949 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754884AbcJRNDA (ORCPT ); Tue, 18 Oct 2016 09:03:00 -0400 Date: Tue, 18 Oct 2016 15:02:42 +0200 From: Peter Zijlstra To: Waiman Long Cc: Linus Torvalds , Jason Low , Ding Tianhong , Thomas Gleixner , Will Deacon , Ingo Molnar , Imre Deak , Linux Kernel Mailing List , Davidlohr Bueso , Tim Chen , Terry Rudd , "Paul E. McKenney" , Jason Low , Chris Wilson , Daniel Vetter Subject: Re: [PATCH -v4 5/8] locking/mutex: Add lock handoff to avoid starvation Message-ID: <20161018130242.GX3117@twins.programming.kicks-ass.net> References: <20161007145243.361481786@infradead.org> <20161007150211.196801561@infradead.org> <58051C5E.3030204@hpe.com> <5805218A.3050707@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5805218A.3050707@hpe.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 17, 2016 at 03:07:54PM -0400, Waiman Long wrote: > One more thing, I think it may be worthwhile to add another comment about > what happens when the HANDOFF bit was set while we take the error path (goto > err). As the actual handoff is serialized by the wait_lock, the code will > still do the right thing. Either the next one in the queue will be handed > off or it will be unlocked if the queue is empty. Doesn't the next patch add just such a comment?