Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1061588rwb; Thu, 11 Aug 2022 15:12:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR7b19kwVe5VOXFszL47/L+LPZjJlCqB0WpsEAXs1NdFZW65t6aRa5hEegDNUtoIjzXJ7VQn X-Received: by 2002:a17:906:9b87:b0:733:1795:2855 with SMTP id dd7-20020a1709069b8700b0073317952855mr741745ejc.156.1660255946609; Thu, 11 Aug 2022 15:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660255946; cv=none; d=google.com; s=arc-20160816; b=zH5x0wlbU5STX71qcq0EHmPgYV9qfYRa1eaKOlOlGKJj077CpMGncu8YYhHuMYPJuq YYdux+Qq02GeJIgB7i9nDMEj6jh4FZMib2EeXXmcCGMODwp9yJWlBm2CU7NzWaojhqeO 1k6YwoHDfJH64VjgkRqtm4zpRjIum7vfiCJAt08t17hblXSndFizutmEQzxJYrGmoS0W Ebiyjl4ma5vJKd16CP1rVZF0Io5NUpaieW+mYJbUP1u5PUs4A1ywYXs9RQONR/7oNGin 8GlDhpTpL+D2a+y7a4QOxu2S//ODiG2f70+GQeDhkRM7QMAa591udZ3l61NwVjmyF1IN sIsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Wq45TFbP2AKILUBXx++bf06XJdFtfjvXV9u0Ru13Lv4=; b=K2whtt47KTSHn3SxYk4mT/RUAxp3mrbvXyLrsK3GXtKglSX7lQh/w3/v+cg4xPE21n kusWsX6E3vph+l3mJzibRRjyneqIx6Vwfz5NqY475r9Ie4kw13FF1MQ7hEdKx/I+cDxJ 34vVAhtyTF0/+Ln332NjiI0l53QupyYV+dLtfpOz+H3j16+H6u1mzod4BC76MRiQN/hJ +Vc59linEY0JiP0ZkwaieEHGSr6bw5BjZ9VwdupU9whG/VBfW61IurIpAg//XeSyvzKk Csgm5EWadX/2fJzHhsOLLKSt7s0rKN0sdx1EFTCY/MxqeDE/P8TkwTLA/NQBu7G8xMCi m0ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="hZeoY/QM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw9-20020a170906478900b0072b61694e92si344301ejc.350.2022.08.11.15.12.00; Thu, 11 Aug 2022 15:12:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="hZeoY/QM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236346AbiHKWEe (ORCPT + 99 others); Thu, 11 Aug 2022 18:04:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235284AbiHKWEd (ORCPT ); Thu, 11 Aug 2022 18:04:33 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E243B94EF3; Thu, 11 Aug 2022 15:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Wq45TFbP2AKILUBXx++bf06XJdFtfjvXV9u0Ru13Lv4=; b=hZeoY/QMps6s+T3DAxj6Mj86EK i74PHci6KNWl9D0ZgPLqENS/3Bp8QnaNbHGtG+Y72pwDAxqxp0rFLe7vgM0pwzngnGlN8vY1Kfew+ wdIQujnP2TvdMuUaQ8M5RTB8aolPgp5oTcpz9xxql7c5PKcphUTGSimpVhRb7YmIIUhWn4peQu41B 2ml9drJ+JjfC/q1fTk0DBjtJriR16FK6I3ZxQSgsdCXbdWen5wZW/ZArsHmhTZeLhA3GQnVc5addF oAtv+Vha6CcgsEp2dR+/JO1hLde+3rpVJHaOzxjSxZ/hE6LsvObUxGb4QvfvFhPytdvpJuyfUgbbY VWmcEzEQ==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oMGHz-003ZFe-0R; Thu, 11 Aug 2022 22:04:27 +0000 Date: Thu, 11 Aug 2022 23:04:26 +0100 From: Al Viro To: Linus Torvalds Cc: Jeff Layton , Ilya Dryomov , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox Subject: Re: [GIT PULL] Ceph updates for 5.20-rc1 Message-ID: References: <20220811152446.281723-1-idryomov@gmail.com> <5d0b0367a5e28ec5b1f3b995c7792ff9a5cbcbd4.camel@kernel.org> <72a93a2c8910c3615bba7c093c66c18b1a6a2696.camel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 11, 2022 at 02:52:26PM -0700, Linus Torvalds wrote: > On Thu, Aug 11, 2022 at 2:38 PM Al Viro wrote: > > > > Exporting the functionality? Sure, no problem. Uninlining that one... > > I suspect that it's OK, but I'd like to see profiling data; it's not > > as if it would be hard to return to having it inlined, obviously. > > The only case where I think it might matter is in __d_lookup(), and > it's probably not measurable. > > Yes, __d_lookup() does matter, but it only matters once you've fallen > out of RCU mode, and at that point the cost of the function call is > likely in the noise. > > I don't particularly like how it's inside that dentry hash chain loop, > but realistically by then we've already done a function call for the > dentry lock spinlock, so that loop already has to deal with it. FWIW, I wonder if we should do if (READ_ONCE(dentry->d_parent) != parent) continue; before grabbing ->d_lock (and repeat the check after grabbing it, of course). It's OK from correctness POV - we are OK with false negatives from __d_lookup() if concurrent rename happens. And it just might be a sufficiently large performance win...