Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5747348iob; Tue, 10 May 2022 02:44:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxIuY7UmM3B22OVUbtBAnQooQrjpsyiU7dyW62ghOij5NN9LPIWHyUwZGHuDFuSjs9i/mA X-Received: by 2002:a17:902:b692:b0:14c:935b:2b03 with SMTP id c18-20020a170902b69200b0014c935b2b03mr19911705pls.81.1652175842278; Tue, 10 May 2022 02:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652175842; cv=none; d=google.com; s=arc-20160816; b=JTdA9mPb3ZMjrgTzogrCKW8ltcdpa5xkBLDi1kMiNuq/JhYLR6AqJOLQ+lPvzAMBTc l0Dtta/kh/xHcs8YFfU3Qws7UBAXFVXzMV7YJrIdHiChz/z5Y3NMa8pIptcj9nXpgvVk 0qmtX8tFNGV1eZM9pYuzXL0GHPnrtBygZkZtgVI62wOFVg3pB6vbL2j/R6Nshxev6LAC n/fLoB4Kfy7qDsPbjgYbPG1P1B0bRngMM7eF6dWAbCFn859Z4u/pDhwjWJ5G6mRIPc7m 4eN4TzJQMa5LBPKfburQ9Vu1NX9ybOubcfMJkzYvCiicJUmQtb+k34Aoup8SPShWeog+ Cdlw== 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=2QFdBMdYEEbUASs02np96D58mKsmERHZc9+DIqJWP78=; b=utVVnUGq9rtv1gp6UX1APRmnfj25+9++GWbCyTIo9pmdawbC4MurCNRbSLGj5BDaIu tL9Zc4z7Bag74ioJSER0FSFKt+14GJcU/25Putap7jEjX8GTgsj+a2H+n/TQ20y6j23N 1LaR2dftgajx4PD3Z7Mqaa42frKIRqAzYF5Vujr7gmu/Ci8tOAZ6uwORZaro9E9I5cta Li3+nwUdwXBB+vakz8I5kCRRLbBgVFPknUsBaeLOMzXzia+b1+py4ZWGsM0UekOz59Uh uZLblO7YBAhoy/ZqQ8nxGan5X+D9zqXjzdPU5sBEkHhm+vAQxQA9zhC6DN+aui3f3ODK FWWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=qQi+i9ZA; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u1-20020a170902b28100b00158da869427si2303696plr.176.2022.05.10.02.43.46; Tue, 10 May 2022 02:44:01 -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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=qQi+i9ZA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235287AbiEJIMT (ORCPT + 99 others); Tue, 10 May 2022 04:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237817AbiEJIMG (ORCPT ); Tue, 10 May 2022 04:12:06 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D40B259FA1 for ; Tue, 10 May 2022 01:08:08 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id i27so31292951ejd.9 for ; Tue, 10 May 2022 01:08:08 -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=2QFdBMdYEEbUASs02np96D58mKsmERHZc9+DIqJWP78=; b=qQi+i9ZAoniWPdwG3ylmPUcac2wf8Zd0T/w/nS4IkCX0SkHWtsVxLcPNyUCNNYVzbs SKLrVJtsuHZOxJf9utf3nZ1kAxJ0Y5h6Rt6gPKKyU3j5RzI862zM7fBWXwNd3l4lr+p6 dD3XO8aDg4AuxFjyL4NW7QgH+gJ4zt0+d9rh8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2QFdBMdYEEbUASs02np96D58mKsmERHZc9+DIqJWP78=; b=xgbFOuQtRQ0LaIHiWNxDeJejgrWhcwn/HevWm6wF5W8ocaUF4Io20CgcPYtVayw3AE zSRz7dxjjqPQIYVgrWlojaFIWffapy6YKfoSKf21dkxn3cURY7AyTuhSi6V4gE4eNJSF M3i4wkKvu8i5rR0L+6zq4Imi7MgAVBIEvzbwFRqQROPXGRzHLKALRbAkoppVTQshDvyb /jBGzUuo6FL9eCOZvh/mgsDNWppyTosLnoOv+bnQD3Y8iqdL+0udvUoI5NhBJH1dNSUy fvUz1p6vPwCaeBoKVrkrQVn+1rfyy8kyZvA6nhGiFGZjCRpDg7v9ZV3BFLUmJz77qR8y wwMA== X-Gm-Message-State: AOAM531/eqH7kYwuuHcjhKbpyT6+WHrnnSAWFWyKckibFlOzuU/KTdV0 fEZm7ve2ld2d/S+KfPvfyeIq49VNzES7XU+fMJpT3A== X-Received: by 2002:a17:906:b48:b0:6f5:132c:1a17 with SMTP id v8-20020a1709060b4800b006f5132c1a17mr18555378ejg.748.1652170086987; Tue, 10 May 2022 01:08:06 -0700 (PDT) MIME-Version: 1.0 References: <20220509124815.vb7d2xj5idhb2wq6@wittgenstein> <8ab7f51cf18ba62e3f5bfdf5d9933895413f4806.camel@themaw.net> In-Reply-To: From: Miklos Szeredi Date: Tue, 10 May 2022 10:07:55 +0200 Message-ID: Subject: Re: [RFC PATCH] getting misc stats/attributes via xattr API To: Ian Kent Cc: Christian Brauner , linux-fsdevel@vger.kernel.org, Dave Chinner , "Theodore Ts'o" , Karel Zak , Greg KH , linux-kernel@vger.kernel.org, Linux API , linux-man , LSM , David Howells , Linus Torvalds , Al Viro , Christian Brauner , Amir Goldstein , James Bottomley Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 Tue, 10 May 2022 at 10:06, Miklos Szeredi wrote: > > On Tue, 10 May 2022 at 06:27, Ian Kent wrote: > > > > Was there ever a test patch for systemd using fsinfo(2)? I think > > > not. > > > > Mmm ... I'm hurt you didn't pay any attention to what I did on this > > during the original fsinfo() discussions. > > I can't find anything related to this in my mailbox. Maybe you > mentioned it at some point, but I have not been involved with the > actual systemd changes. So not meant to belittle your work at all. > > > > Until systemd people start to reengineer the mount handing to allow > > > for retrieving a single mount instead of the complete mount table we > > > will never know where the performance bottleneck lies. > > > > We didn't need the systemd people to do this only review and contribute > > to the pr for the change and eventually merge it. > > > > What I did on this showed that using fsinfo() allone about halved the > > CPU overhead (from around 4 processes using about 80%) and once the > > mount notifications was added too it went down to well under 10% per > > process. The problem here was systemd is quite good at servicing events > > and reducing event processing overhead meant more events would then be > > processed. Utilizing the mount notifications queueing was the key to > > improving this and that was what I was about to work on at the end. > > > > But everything stopped before the work was complete. > > > > As I said above it's been a long time since I looked at the systemd > > work and it definitely was a WIP so "what you see is what you get" > > at https://github.com/raven-au/systemd/commits/. It looks like the > > place to look to get some idea of what was being done is branch > > notifications-devel or notifications-rfc-pr. Also note that this > > uses the libmount fsinfo() infrastrucure that was done by Karal Zak > > (and a tiny bit by me) at the time. > > Looks great as a first step. > > What do you mean by "Utilizing the mount notifications queueing"? > > Do you mean batching of notifications? I think that's a very > important issue: processing each individual notifcation may not make > sense when there are lots of them. For example, doing ceate > mount+remote mount in a loop a million times will result in two s/remote/remove/ > million notification messages (with high likelyhood of queue > overflow), but in the end the mount table will end up being the > same... > > Thanks, > Miklos