Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp377191ybb; Wed, 1 Apr 2020 01:37:56 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt/Dz+4VtbMHaJtQwT2CXeQkUCiJs1tRTZKioUfaZVC1s6FBzLp2yN8RQmi9CvRoGuvd4R+ X-Received: by 2002:a9d:6e02:: with SMTP id e2mr16393095otr.317.1585730276180; Wed, 01 Apr 2020 01:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585730276; cv=none; d=google.com; s=arc-20160816; b=aNKXzbLyel23rkl1dSTmnopII15j4Bq1a29fNOJ+PMwTR8fAAJ5ElsEtG1Tv8W61zW tcjiY/FzBN7tqv3yxm4LvsQcX2uE3Lm1NQwRKZsX6aJhyERjbyF3jvFPa2MUNfEqkPH7 4jwP0IH4Wi0RdtF+0kJUrIPYOMDJD0RyQyc2A1GaZEpWbtAq8r8ybf7xBom5gset1TZ1 nsJVXiZQUYubPrpwkDzT/IXl9XIBL6HeFRXUyihWNwElNMbZC+cw4pDy0t67ByVr2TCQ +Ta03fmT/a8dMyoT7hamaxI8+XbE8qEUl4bUOxqZVOuslZ5lmJxPpuR14ytDYMxtUc6B APHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7Pb5WxXo01OUrPYKfuGBoAi7COZxVQpsVUvg17nkA6w=; b=Lx8UHKjB5LLpltP7aBG08Ej7Ud20BI38NIH0zXWXufB0OUIbccQC7WWzi2H/AEm9WR S3MgPyVn+egADYemMaie8k2upyfZaOnCYDArhwTqTkGoWZI/RvKyw5MgiCoaT8Fr9m9Y lzpm4pLlwuIYVu/xwjdyvqrPOj1soVqs6OrpWmbt3MPwge03myJnyao8rVSrqtdA1IPK KdKw1QUmelvf2Zi78Et098XE3vq3BvpH1jWynDGqWH8Yenm/r+XCl2EnbDZEg2yv4Fn6 26n5mnyhkXh+GZvY3/FEPeyH5vYtIXE7w/nWcKkTjujH9XHWKF/JgPo7+jQ5wAJptNtY 5J6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=DCWoZP8f; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j15si550014oos.59.2020.04.01.01.37.43; Wed, 01 Apr 2020 01:37:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=DCWoZP8f; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730420AbgDAIhh (ORCPT + 99 others); Wed, 1 Apr 2020 04:37:37 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:39114 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730750AbgDAIhg (ORCPT ); Wed, 1 Apr 2020 04:37:36 -0400 Received: by mail-ed1-f65.google.com with SMTP id a43so28645741edf.6 for ; Wed, 01 Apr 2020 01:37:34 -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=7Pb5WxXo01OUrPYKfuGBoAi7COZxVQpsVUvg17nkA6w=; b=DCWoZP8f/dOkjW5uYoUFpfMxBGbKeZuXpLeJJK8mTpafT0iBm07aAautrwxGNxNPuH kwa+oyklRAFDRmQ9G/64ndypZ3iC1AQSMWoHkTRNK/CJ98o+a+FWbDoEu0LWLRzfWA12 BQCicYA5Tma7uC+qkVwM5zNRNQOh9LLVhWIgE= 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=7Pb5WxXo01OUrPYKfuGBoAi7COZxVQpsVUvg17nkA6w=; b=PrK4AV7LyEqGhTE+faweb+Xq+45WRCVo3d5HIPepfW3WD0Nfz2BK9PgrnNPCvK0QO5 dJWJVL/NpMf8Um7GZ2p5FVKyB73e1vwy7xta1LV+stCM2iMZC/wNmFhH3meepasE3yEr OvSm8oH+5tMZCHGPs2xNdrt7SzkvbNevBGmvPS9S9EymnrsILk3/hq0mZD1A4VgA1+DK CAGNy1sxLpBOx9OcWsa+U4zGj9VPldcrz3Qq59TXXX+nmg/pKZm6F318hZk7F+oh6TPh tpu5BclcoRCTqxYFAi8mTYyFPiOLBIK1O/CvYj3+l5pfMmKXgcVBUo1hyZzm7nKgfIOz tGTA== X-Gm-Message-State: ANhLgQ3YPSeiNLTnhX/MdaofV9d+KEmbI4PJewBohRDm041uVaJiZwx5 xVlLijLKEmto1OXhIlYuAnZp8uvqqPgyF/I4rIppMA== X-Received: by 2002:a50:8326:: with SMTP id 35mr19766368edh.134.1585730253359; Wed, 01 Apr 2020 01:37:33 -0700 (PDT) MIME-Version: 1.0 References: <158454408854.2864823.5910520544515668590.stgit@warthog.procyon.org.uk> <50caf93782ba1d66bd6acf098fb8dcb0ecc98610.camel@themaw.net> <2465266.1585729649@warthog.procyon.org.uk> In-Reply-To: <2465266.1585729649@warthog.procyon.org.uk> From: Miklos Szeredi Date: Wed, 1 Apr 2020 10:37:22 +0200 Message-ID: Subject: Re: [PATCH 00/13] VFS: Filesystem information [ver #19] To: David Howells Cc: Ian Kent , Linus Torvalds , Al Viro , Linux NFS list , Andreas Dilger , Anna Schumaker , "Theodore Ts'o" , Linux API , linux-ext4@vger.kernel.org, Trond Myklebust , Miklos Szeredi , Christian Brauner , Jann Horn , "Darrick J. Wong" , Karel Zak , Jeff Layton , linux-fsdevel@vger.kernel.org, LSM , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Apr 1, 2020 at 10:27 AM David Howells wrote: > > Miklos Szeredi wrote: > > > According to dhowell's measurements processing 100k mounts would take > > about a few seconds of system time (that's the time spent by the > > kernel to retrieve the data, > > But the inefficiency of mountfs - at least as currently implemented - scales > up with the number of individual values you want to retrieve, both in terms of > memory usage and time taken. I've taken that into account when guesstimating a "few seconds per 100k entries". My guess is that there's probably an order of magnitude difference between the performance of a fs based interface and a binary syscall based interface. That could be reduced somewhat with a readfile(2) type API. But the point is: this does not matter. Whether it's .5s or 5s is completely irrelevant, as neither is going to take down the system, and userspace processing is probably going to take as much, if not more time. And remember, we are talking about stopping and starting the automount daemon, which is something that happens, but it should not happen often by any measure. > With fsinfo(), I've tried to batch values together where it makes sense - and > there's no lingering memory overhead - no extra inodes, dentries and files > required. The dentries, inodes and files in your test are single use (except the root dentry) and can be made ephemeral if that turns out to be better. My guess is that dentries belonging to individual attributes should be deleted on final put, while the dentries belonging to the mount directory can be reclaimed normally. Thanks, Miklos