From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:57310 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751236AbcFYWy2 (ORCPT ); Sat, 25 Jun 2016 18:54:28 -0400 Date: Sat, 25 Jun 2016 23:54:24 +0100 From: Al Viro To: Linus Torvalds Cc: "J. R. Okajima" , linux-fsdevel , George Spelvin Subject: Re: Q. hlist_bl_add_head_rcu() in d_alloc_parallel() Message-ID: <20160625225423.GV14480@ZenIV.linux.org.uk> References: <13136.1466196630@jrobl> <20160617221614.GE14480@ZenIV.linux.org.uk> <2123.1466313884@jrobl> <20160619165557.GH14480@ZenIV.linux.org.uk> <28627.1466397254@jrobl> <20160620053530.GI14480@ZenIV.linux.org.uk> <20287.1466644756@jrobl> <20160623025809.GT14480@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jun 23, 2016 at 10:57:09PM -0700, Linus Torvalds wrote: > The non-RCU case basically never shows up in profiles (it used to, > with symlinks, but you fixed that case), and if it ever does I suspect > that the fix will be to make sure we don't fall out of rcu. > > So don't worry too much about __d_lookup() being a hot case, I don't > think it is. > > (Of course, if you have a load that shows me wrong, let's look at it > by all means. Maybe the loads I have used have been bad) BTW, speaking of that area - is there any reason why dentry_cmp() isn't simply return dentry_string_cmp(lockless_dereference(dentry->d_name.name), ct, tcount); other than "it predates lockless_dereference()"? The only difference is s/ACCESS_ONCE/READ_ONCE/, AFAICS - lockless_dereference() uses the latter these days. And that shouldn't be a problem; as the matter of fact, *all* remaining ACCESS_ONCE in fs/dcache.c look like they should become READ_ONCE. Objections? Al, digging through the barrier-related issues with dentries and peeling the paint off the walls in process...