Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1626375pxb; Mon, 12 Apr 2021 02:47:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZJLguWvse3lfBa2xw1IsLDGCeQWtMXm4MsKrd06gBX8zImIVDCIVXrxRUSAnHBjKizD0N X-Received: by 2002:a63:d24c:: with SMTP id t12mr25276707pgi.111.1618220820030; Mon, 12 Apr 2021 02:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618220820; cv=none; d=google.com; s=arc-20160816; b=avaS3TSeJYzjVFOtMKPNmNkvmNMQ05bT2/Q2/tZap9Ae889Bwqyo7mJ/+HY8azQG3g S7opK2MD9QmZqtJejwU3k8V2OBgEFZhbjUOt5PIJbIDp4bCiJdcGQqm08Yyo7YSrOzvy HeNo57zzHau3V9s+MFMwhf4uO13qd0kCAJ2IHwIkTfn+2vGgN/g2g1+gIY+9msPa1X4B n5TlyM4E4l4X99GjKNUpt2Z8jUHF1NrHifugv71aMSZscAVy0ORIf+gF7BWoAPWkQM9w gCtr4ZxZ27W2arHqXp4xiPowZ3fA9cQhzsmkGg7qeNLg+6JChbqIgc+PGYMabPkpr6+L I/IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6hKUVtRAYKksa4g4Z/SOXZ+I+SLzgB72dysIQbYZhlk=; b=GRPy2DtEsHB3UI2n2p2aPQYT0LMRst8fRaMsC4zAGuCUWLhtvCXgejci/xW6Rb+qFE WDOlFm+Mejaxhhr3DYY5qZuQaVbJ6rhurbPAPPYzutfc3cM+Aa7t1Ycf/e2YIJ4eVPKE RDQ83Z/fOyF1tDhinfNsvnDrFIYKG2jJAvjf9EtEzhDbOtqgUQHrq5rLJCsU0HA7IrwO e8Xtn6gZZPgQF1kLW8LGKO6BYzTxoBgeJ0OBKJmXBlRSg1Om/QBiHFAd4Q+TbRcdhQFe S9BytJM3Cz9Z/gUtVnKC4mZr8+cqVFlNBfQOK5bDG76PIU7nAaMk5Ep7+cDB3b+Ckhy7 KE8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=CitFYvjq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si9837563plc.267.2021.04.12.02.46.48; Mon, 12 Apr 2021 02:47:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=CitFYvjq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240223AbhDLJpl (ORCPT + 99 others); Mon, 12 Apr 2021 05:45:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242234AbhDLJ2E (ORCPT ); Mon, 12 Apr 2021 05:28:04 -0400 Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D139BC06138D for ; Mon, 12 Apr 2021 02:27:46 -0700 (PDT) Received: by mail-vs1-xe33.google.com with SMTP id g20so6305359vst.2 for ; Mon, 12 Apr 2021 02:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6hKUVtRAYKksa4g4Z/SOXZ+I+SLzgB72dysIQbYZhlk=; b=CitFYvjqQpJous7ooVmqfhnFsbgLlnpEDxsDp/0RahdDGBuwdMycdneGcKTEi88ZzZ icSfVdFS15Oe9zZx8G7npVnJ3yX5/NnRtCizxLwUgVHWsSjMKS/xvGkHJqooZ72EEjTl XCQwB/3XWLH1ObPZxWsIpNdO64fsA4CPgZjc8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6hKUVtRAYKksa4g4Z/SOXZ+I+SLzgB72dysIQbYZhlk=; b=KL9lTeoquTLcKts1E/zRTuxkupQyXkNyXM1qrKtby2O30Z/nVeqcAHExOlRTr22RdB r2ECTJ0jInA/3qsyaUnITx/qDwoFiWJYPrkf9qcHvaxNrHrSOjIqtizYopLQHut6+77J SygRtvBE3W0HXtA2/JGlrQfFq1DQ2QCt0+INAwdTRAdoOmItnTmOOK1/8VmNb27RPpt2 SZy4If2oOqa7S7A37o9l87Hf77mqvSRCYFOI/VVaH6F5Rh1Yd1hXUcAQmKmco4Clyqp2 O43WTQvht11IQc2qFv/Y60gYxIFj95IdBBBynj5BcGxZ7fLApd0VyUtZBsVNMOYJ4JtA CWiQ== X-Gm-Message-State: AOAM5310PboV1Gt4BvxwyNVvDnT5Rg5k5IsNqjDU9yRa8lI/UpyzFYqY D6N+/Qog2nspp4g2pCaIgMMaOM2qNo5M0YCq74rZaBARQqc9mcO/ X-Received: by 2002:a67:f487:: with SMTP id o7mr19224439vsn.7.1618219664676; Mon, 12 Apr 2021 02:27:44 -0700 (PDT) MIME-Version: 1.0 References: <20210323160629.228597-1-mszeredi@redhat.com> In-Reply-To: <20210323160629.228597-1-mszeredi@redhat.com> From: Miklos Szeredi Date: Mon, 12 Apr 2021 11:27:33 +0200 Message-ID: Subject: Re: [PATCH] vfs: allow stacked ->get_acl() in RCU lookup To: Miklos Szeredi Cc: Al Viro , overlayfs , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, garyhuang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 23, 2021 at 5:07 PM Miklos Szeredi wrote: > > Overlayfs does not cache ACL's to avoid double caching with all its > problems. Instead it just calls the underlying filesystem's > i_op->get_acl(), which will return the cached value, if possible. > > In rcu path walk, however, get_cached_acl_rcu() is employed to get the > value from the cache, which will fail on overlayfs resulting in dropping > out of rcu walk mode. This can result in a big performance hit in certain > situations. > > Add a flags argument to the ->get_acl() callback, and allow > get_cached_acl_rcu() to call the ->get_acl() method with LOOKUP_RCU. > > Don't do this for the generic case of a cache miss, only in case of > ACL_DONT_CACHE. > > Reported-by: garyhuang > Signed-off-by: Miklos Szeredi Hi Al, Could you please apply this patch? It's fairly trivial, but unfortunately adds a fair bit of API churn. Thanks, Miklos