From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753734AbcFFX7G (ORCPT ); Mon, 6 Jun 2016 19:59:06 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:35382 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752067AbcFFX7E (ORCPT ); Mon, 6 Jun 2016 19:59:04 -0400 MIME-Version: 1.0 In-Reply-To: References: <5755D671.9070908@intel.com> <20160606211522.GF14480@ZenIV.linux.org.uk> <20160606220753.GG14480@ZenIV.linux.org.uk> From: Linus Torvalds Date: Mon, 6 Jun 2016 16:59:02 -0700 X-Google-Sender-Auth: bDsC5lSPQt9xNotoc_CdFZz7TNs Message-ID: Subject: Re: performance delta after VFS i_mutex=>i_rwsem conversion To: Al Viro Cc: Dave Hansen , "Chen, Tim C" , Ingo Molnar , Davidlohr Bueso , "Peter Zijlstra (Intel)" , Jason Low , Michel Lespinasse , "Paul E. McKenney" , Waiman Long , 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 4:50 PM, Linus Torvalds wrote: > > > And I do want to repeat that the patch is entirely untested. It compiles. > I looked at the assembly it generated. It looks fine to me, but I might > have had a brainfart and done something completely broken. Dammit. I did that whole dcache_emit_entry() thing because we need to do the final target cursor move regardless, and dcache_emit_entry() will always return with the spinlock held again. But then I didn't actually fix the "return" to a "break". So the "return 0" here: > + /* This will drop and re-take the dentry lock .. */ > + if (!dcache_emit_entry(ctx, dentry, child)) > return 0; is fatal and woudl return with the spinlock held. It *should* have been a "break" to exit the readdir loop. So the patch I sent out was indeed a terminal brainfart, but with that fix to change that return to a "break" it *might* work. Linus