From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752594AbcFFVUg (ORCPT ); Mon, 6 Jun 2016 17:20:36 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:33620 "EHLO mail-oi0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751190AbcFFVUe (ORCPT ); Mon, 6 Jun 2016 17:20:34 -0400 MIME-Version: 1.0 In-Reply-To: <5755E782.90800@hpe.com> References: <5755D671.9070908@intel.com> <5755E782.90800@hpe.com> From: Linus Torvalds Date: Mon, 6 Jun 2016 14:20:32 -0700 X-Google-Sender-Auth: x0IPOkuK25HCfiWkEpZpaIAVdjY Message-ID: Subject: Re: performance delta after VFS i_mutex=>i_rwsem conversion To: Waiman Long Cc: Dave Hansen , "Chen, Tim C" , Ingo Molnar , Davidlohr Bueso , "Peter Zijlstra (Intel)" , Jason Low , Michel Lespinasse , "Paul E. McKenney" , Waiman Long , Al Viro , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 6, 2016 at 2:13 PM, Waiman Long wrote: > > The tricky part about optimistic spinning in rwsem is that we don't know for > sure if any of the lock holding readers is running or not. I'm notm sure how common the reader-vs-writer contention is, at least for the new inode use. I'm sure you can trigger it with crazy benchmarks, but I wouldn't worry about it unless people start complaining. The writer-writer case is easy to trigger with write-heavy loads (ok, rename/unlink in this case). Are there real loads where there are lots of concurrent lookup and writes? I really don't know (note that "lookup" needs to be uncached and actually hit the lowlevel filesystem for the locking to even trigger in the first place). I guess some "concurrent readdir with unlink" load would show that behavior, but is it _realistic_? No idea. Let's not worry about it too much until somebody shows a reason to worry. Linus