From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16732C4361B for ; Fri, 11 Dec 2020 01:01:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC739230FF for ; Fri, 11 Dec 2020 01:01:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394709AbgLKA7g (ORCPT ); Thu, 10 Dec 2020 19:59:36 -0500 Received: from mail106.syd.optusnet.com.au ([211.29.132.42]:38212 "EHLO mail106.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394708AbgLKA7V (ORCPT ); Thu, 10 Dec 2020 19:59:21 -0500 Received: from dread.disaster.area (pa49-179-6-140.pa.nsw.optusnet.com.au [49.179.6.140]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 8767F765018; Fri, 11 Dec 2020 11:58:35 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1knWlS-002fcc-Qb; Fri, 11 Dec 2020 11:58:30 +1100 Date: Fri, 11 Dec 2020 11:58:30 +1100 From: Dave Chinner To: Linus Torvalds Cc: Jens Axboe , linux-fsdevel , Al Viro Subject: Re: [PATCH 2/2] fs: expose LOOKUP_NONBLOCK through openat2() RESOLVE_NONBLOCK Message-ID: <20201211005830.GD3913616@dread.disaster.area> References: <20201210200114.525026-1-axboe@kernel.dk> <20201210200114.525026-3-axboe@kernel.dk> <20201210222934.GI4170059@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=YKPhNiOx c=1 sm=1 tr=0 cx=a_idp_d a=uDU3YIYVKEaHT0eX+MXYOQ==:117 a=uDU3YIYVKEaHT0eX+MXYOQ==:17 a=kj9zAlcOel0A:10 a=zTNgK-yGK50A:10 a=7-415B0cAAAA:8 a=zJOtU--gRZm0aBwq0xkA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Dec 10, 2020 at 03:29:23PM -0800, Linus Torvalds wrote: > On Thu, Dec 10, 2020 at 2:29 PM Dave Chinner wrote: > > > > So, really, this isn't avoiding IO at all - it's avoiding the > > possibility of running a lookup path that might blocking on > > something. > > For pathname lookup, the only case that matters is the RCU lockless lookup. > > That cache hits basically 100% of the time except for the first > lookup, or under memory pressure. > > And honestly, from a performance perspective, it's the lockless path > lookup that matters most. By the time you have to go to the > filesystem, take the directory locks etc, you've already lost. > > So we're never going to bother with some kind of "lockless lookup for > actual filesystems", because it's only extra work for no actual gain. > > End result: LOOKUP_NONBLOCK is about not just avoiding IO, but about > avoiding the filesystem and the inevitable locking that causes. Umm, yes, that is _exactly_ what I just said. :/ Cheers, Dave. -- Dave Chinner david@fromorbit.com