From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751576AbcFIK0B (ORCPT ); Thu, 9 Jun 2016 06:26:01 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33446 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbcFIKZ6 (ORCPT ); Thu, 9 Jun 2016 06:25:58 -0400 Date: Thu, 9 Jun 2016 12:25:52 +0200 From: Ingo Molnar To: Waiman Long Cc: Linus Torvalds , Dave Hansen , "Chen, Tim C" , Ingo Molnar , Davidlohr Bueso , "Peter Zijlstra (Intel)" , Jason Low , Michel Lespinasse , "Paul E. McKenney" , Waiman Long , Al Viro , LKML Subject: Re: performance delta after VFS i_mutex=>i_rwsem conversion Message-ID: <20160609102552.GA16968@gmail.com> References: <5755D671.9070908@intel.com> <5755E782.90800@hpe.com> <20160608085837.GA10792@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160608085837.GA10792@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ingo Molnar wrote: > > * Waiman Long wrote: > > > I do have a patchset that allow us to more accurately determine the state of > > the lock owner. > > > > locking/rwsem: Add reader-owned state to the owner field > > http://www.spinics.net/lists/kernel/msg2258572.html > > > > That should eliminate the performance gap between mutex and rwsem wrt > > spinning when only writers are present. I am hoping that that patchset can > > be queued for 4.8. > > Yeah, so I actually had this series merged for testing last week, but a > complication with a prereq patch made me unmerge it. But I have no fundamental > objections, at all. > > I also agree with Linus's general observation that we want to make > down_write()/up_write() match mutex performance characteristics. > > I think kernel developers should fundamentally be able to switch between > mutex_lock()/unlock() and down_write()/up_write() and back, without noticing > any high level behavioral changes. Ok, these enhancements are now in the locking tree and are queued up for v4.8: git pull git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core Dave, you might want to check your numbers with these changes: is rwsem performance still significantly worse than mutex performance? Thanks, Ingo