Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2064346pxb; Fri, 25 Mar 2022 10:27:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5+hvNnUqsiQWXDHwaiET/VHNsB3Tq7vMezwgtRxuvCZ/ozILzQHhaNHXpH6SB4ZBwR7H9 X-Received: by 2002:a17:902:d4cc:b0:154:3a3b:4172 with SMTP id o12-20020a170902d4cc00b001543a3b4172mr12518024plg.165.1648229235108; Fri, 25 Mar 2022 10:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648229235; cv=none; d=google.com; s=arc-20160816; b=pmAvze96RZfjxLyH1Afh6o8feqYDTWF3VWYnu3KWe4sOv5vxHA7uTG8K+8UH1hQYBa wFzO4yrTyXaZM8Iss+Lrytl8Pi2/g2MLzJ9bp5MagFH/EkF3ty/SqFztigZiprA/615I ThLe6rKxVZKP+yWejlh90QiesIjFKe7e5SB8t7XQs9KIi6zaTTriziBhpNcjld61GI3F FTPTPn/NcUccZP54/K+FdZi0vxY8AZ6dpMB5FYuJyVXudVgPF5+2unQjRTfiwh7kPl4L wkbXLrCWeCTb73diXRCDhs9QQtIMHVfFb9Q3zbbIm16Yd2AFhnWb1oimtmyIwlPD2pfy N3MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3LAcZ86phd5KooVZZ6Y1mPcr9GXiECGS2GkKBYOKDWE=; b=VW2y5qIRKRaIv+ykBpkXZrGHQZRkU6m+DG+P2MOU8l65CqtnAV/IH1waj+ujulL1Sd cSlgpVVuLsONOtBBItXEUJGGyqDhr9Zyhd3yenV5o5r7pd+VGaoqX843zbTUTcotMLuq mIXUDDNAu4GJgqdoFmSlJ3LcgBB3yU+FXUvAqMmW+k1ZZr/90Kr+ZoWTkzxZzZW5AV5L 88OnECG9F9LAYxhE2h6jXVGuvbI7bRNQec6PcjwIUM5Dp3Qos30c8F3jXYPtSSM3zuaH F2yxwamk61FYuBButub1hRVGmzvHCrE4CwxdH4CHpr0DlOy/+omZpW2URnEARLyHWYZ+ Z2Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FgUxekXC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x12-20020a170902ec8c00b00153b2d164a9si3117731plg.177.2022.03.25.10.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 10:27:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FgUxekXC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0EE2DFFF88; Fri, 25 Mar 2022 10:21:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355837AbiCYIsh (ORCPT + 99 others); Fri, 25 Mar 2022 04:48:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355881AbiCYIsb (ORCPT ); Fri, 25 Mar 2022 04:48:31 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 38E86CA0C4 for ; Fri, 25 Mar 2022 01:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648198017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3LAcZ86phd5KooVZZ6Y1mPcr9GXiECGS2GkKBYOKDWE=; b=FgUxekXC8SdjlNmEoQ7YW5X21G4zoBuRk6ucyzMYMx2wpvXEtq57miqZHd0stUCQCYmOxp gvbxIwHe8an22cGbYZmbWldCMjHvbYWec2J4aCFSdRQupqqKCHJVrILswNW4S9a0nn6Ej0 xBmP4TkEzMh1onH4bo3frDWvokLrUO0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-159-Obdy5gfrMnOVvgfhwSjOuA-1; Fri, 25 Mar 2022 04:46:52 -0400 X-MC-Unique: Obdy5gfrMnOVvgfhwSjOuA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5519A1C05151; Fri, 25 Mar 2022 08:46:51 +0000 (UTC) Received: from ws.net.home (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E23D4432703; Fri, 25 Mar 2022 08:46:48 +0000 (UTC) Date: Fri, 25 Mar 2022 09:46:46 +0100 From: Karel Zak To: Miklos Szeredi Cc: Theodore Ts'o , Christian Brauner , Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Linux API , linux-man , LSM , Ian Kent , David Howells , Linus Torvalds , Al Viro , Christian Brauner , Amir Goldstein , James Bottomley Subject: Re: [RFC PATCH] getvalues(2) prototype Message-ID: <20220325084646.7g6oto2ce3vou54x@ws.net.home> References: <20220322192712.709170-1-mszeredi@redhat.com> <20220323114215.pfrxy2b6vsvqig6a@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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, Mar 24, 2022 at 09:44:38AM +0100, Miklos Szeredi wrote: > > If so, have you benchmarked lsof using this new interface? > > Not yet. Looked yesterday at both lsof and procps source code, and > both are pretty complex and not easy to plug in a new interface. But > I've not yet given up... I can imagine something like getvalues(2) in lsblk (based on /sys) or in lsfd (based on /proc; lsof replacement). The tools have defined set of information to read from kernel, so gather all the requests to the one syscall for each process or block device makes sense and it will dramatically reduce number of open+read+close syscalls. Karel -- Karel Zak http://karelzak.blogspot.com