From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753318AbcHZPS4 (ORCPT ); Fri, 26 Aug 2016 11:18:56 -0400 Received: from merlin.infradead.org ([205.233.59.134]:34498 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752808AbcHZPSy (ORCPT ); Fri, 26 Aug 2016 11:18:54 -0400 Date: Fri, 26 Aug 2016 17:18:18 +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: [RFC][PATCH -v2 4/4] locking/mutex: Add lock handoff to avoid starvation Message-ID: <20160826151818.GO10121@twins.programming.kicks-ass.net> References: <20160825183734.113736626@infradead.org> <20160825184324.934871397@infradead.org> <57BF6A73.1050505@hpe.com> <20160825222328.GN10138@twins.programming.kicks-ass.net> <57C05287.8000708@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57C05287.8000708@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 Fri, Aug 26, 2016 at 10:30:31AM -0400, Waiman Long wrote: > On 08/25/2016 06:23 PM, Peter Zijlstra wrote: > >You're right.. I'll try again tomorrow. > > Actually, it is also OK to handoff from NULL=>new, but nothing else is > appropriate. I pushed out new patches to git, could you have a peek? - killed another of that mutex abuse - fixed ATOMIC_FETCH_OP for SH4 - split: rm arch/*/include/asm/mutex*.h include/asm-generic/mutex*.h into a separate patch to aid in review - fixed lockdep - added an uncontended unlock fast path, to mirror the unconteded lock fast path - reworked the handoff stuff (again) I didn't try and be too clever, since its far too hot to think. Still need to look at adding spinning to the handoff case. Also need to look at writing (much) better changelogs, they stink.