From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757981AbcHWVui (ORCPT ); Tue, 23 Aug 2016 17:50:38 -0400 Received: from merlin.infradead.org ([205.233.59.134]:53662 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757731AbcHWVty (ORCPT ); Tue, 23 Aug 2016 17:49:54 -0400 Date: Tue, 23 Aug 2016 22:34:17 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Davidlohr Bueso , Waiman Long , Jason Low , Ding Tianhong , Thomas Gleixner , Will Deacon , Ingo Molnar , Imre Deak , Linux Kernel Mailing List , Tim Chen , Terry Rudd , "Paul E. McKenney" , Jason Low Subject: Re: [RFC][PATCH 0/3] locking/mutex: Rewrite basic mutex Message-ID: <20160823203417.GV10153@twins.programming.kicks-ass.net> References: <20160823124617.015645861@infradead.org> <20160823161750.GD31186@linux-80c1.suse> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, Aug 23, 2016 at 02:53:07PM -0400, Linus Torvalds wrote: > On Tue, Aug 23, 2016 at 12:17 PM, Davidlohr Bueso wrote: > > > >> 46 files changed, 160 insertions(+), 1298 deletions(-) > > > > Oh my. > > Yeah, that looks like a pretty compelling argument right there, if > there isn't any other really major downside to this... > > Peter, is there some downside that isn't obvious? Like "Well, this > does regress performance because it now always does X"? The biggest difference is the mutex fast paths, where they were a single atomic and branch they're now a bit bigger. How much that matters in practise is something that we'll have to benchmark a bit. Esp. the mutex_lock() fast-path now also needs to load current, which at least should be fairly hot but can still be a number of dependent loads on some archs.