From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161864AbcFHI6q (ORCPT ); Wed, 8 Jun 2016 04:58:46 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:38663 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932551AbcFHI6n (ORCPT ); Wed, 8 Jun 2016 04:58:43 -0400 Date: Wed, 8 Jun 2016 10:58:37 +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: <20160608085837.GA10792@gmail.com> References: <5755D671.9070908@intel.com> <5755E782.90800@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5755E782.90800@hpe.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 * 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. Any 'reader/writer mixing' artifacts are secondary concerns and we'll sort them out as they happen. Thanks, Ingo