Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4750466ybf; Wed, 4 Mar 2020 09:56:43 -0800 (PST) X-Google-Smtp-Source: ADFU+vssWUtKVW6wCMcGFOz+VpezRB2Gqh0mtkJPMjiDcafnrYTefWUSeXbfG3t9yHfIKKtC6Aqc X-Received: by 2002:a9d:6c1:: with SMTP id 59mr3536059otx.281.1583344603403; Wed, 04 Mar 2020 09:56:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583344603; cv=none; d=google.com; s=arc-20160816; b=TS14q9lrUDpvYoaamFEdNE1hqYQUAhuvLsujQw18ik9xl+dvWXRnr0WuZwHHoFV5p+ Wlvs4dRG5gE9cMZjXx0L17OnGoXSebS+crx9/eG6GlXzIjvMkm9029Kj6RnBN5wR3SqT n4LqJ8RHFQzBHCm0qD7wYj20VxpHG/wGv67vmDpeQz5DkWJhjwoHRxgv2sPD9lD2yAnj 2/03N8Dl/3BTcTipzLG/aHTRh0sQ8vR5bWOO1hCdegYJuldC5b2G/UIr194yYeyI85L4 X8j1AWr19QPbx4eX4soBfOK5lhGhfuR3QgyZmBvQa1h1ZWu+UJWdHyh69HzVBpXTWkZz w+5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=i1Cgn4yp7EaKnNlZymNOD5ifYaNSlnfx75qVUEAj3xM=; b=MfCLoebAx+AxRSUPLhocxeu6BDQUfXhqsEwIQXsfZ4mIaB0QKgL+FUkTZCjd+pX96Q AJ26KKqj/1KN9oufh0KcEj80qIVXPkZ/VcQsBmqG+LFPlbocgkHsrTxTZl3qtdlj5TSD 98JaPDB13V0fq1UMU2C73Xw/rEL98ihJ4xPYorLJlFpoD3zYxlUXNWEf68pxWpco5GiN QvFRP29WVA/v2sOhncLBkjSTh/u1JLiHxFuiQe519k7/Wg/+Qt2Sq06ZeAKqJsrYoXf5 +0DNPDwfj/YFYKqtfeqQUg5b0PViqJTf43t7HEczBGsRnNs/0bRkPvNg9hbsNgB32Vj/ fmIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZluYnYJH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si1701154oic.83.2020.03.04.09.56.31; Wed, 04 Mar 2020 09:56:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZluYnYJH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730053AbgCDR4P (ORCPT + 99 others); Wed, 4 Mar 2020 12:56:15 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:60771 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729471AbgCDR4P (ORCPT ); Wed, 4 Mar 2020 12:56:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583344573; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i1Cgn4yp7EaKnNlZymNOD5ifYaNSlnfx75qVUEAj3xM=; b=ZluYnYJHXohvqOIBHhL2M0CV7Rt6oLSVBaOywYgCcjp/oonSZSjioI7p5oIcDvvrYx72kn dEPsu7Dg8fPg/wGDVWFKQxWexELn14MjxK4JCfL9EFxX898Jqq6MC8KQSffH0z0LL34upA WjC2sBcZkwBnpDJfB79PFejIXIjlwuo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-7y7GWO5UPeCY2a9BNTDovA-1; Wed, 04 Mar 2020 12:56:10 -0500 X-MC-Unique: 7y7GWO5UPeCY2a9BNTDovA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D99F9801E76; Wed, 4 Mar 2020 17:56:07 +0000 (UTC) Received: from ws.net.home (ovpn-204-202.brq.redhat.com [10.40.204.202]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45A915C548; Wed, 4 Mar 2020 17:55:59 +0000 (UTC) Date: Wed, 4 Mar 2020 18:55:56 +0100 From: Karel Zak To: Greg Kroah-Hartman Cc: Ian Kent , Miklos Szeredi , David Howells , Christian Brauner , James Bottomley , Steven Whitehouse , Miklos Szeredi , viro , Christian Brauner , Jann Horn , "Darrick J. Wong" , Linux API , linux-fsdevel , lkml Subject: Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver #17] Message-ID: <20200304175556.45dsgxumv4ubz7qy@ws.net.home> References: <0403cda7345e34c800eec8e2870a1917a8c07e5c.camel@themaw.net> <1509948.1583226773@warthog.procyon.org.uk> <20200303113814.rsqhljkch6tgorpu@ws.net.home> <20200303130347.GA2302029@kroah.com> <33d900c8061c40f70ba2b9d1855fd6bd1c2b68bb.camel@themaw.net> <20200304152241.iaiulvl5xisnuxp6@ws.net.home> <20200304164913.GB1763256@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20200304164913.GB1763256@kroah.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 04, 2020 at 05:49:13PM +0100, Greg Kroah-Hartman wrote: > On Wed, Mar 04, 2020 at 04:22:41PM +0100, Karel Zak wrote: > > $ strace -e openat,read,close -c ps aux > > ... > > % time seconds usecs/call calls errors syscall > > ------ ----------- ----------- --------- --------- ---------------- > > 43.32 0.004190 4 987 read > > 31.42 0.003039 3 844 4 openat > > 25.26 0.002443 2 842 close > > ------ ----------- ----------- --------- --------- ---------------- > > 100.00 0.009672 2673 4 total > >=20 > > $ strace -e openat,read,close -c lsns > > ... > > % time seconds usecs/call calls errors syscall > > ------ ----------- ----------- --------- --------- ---------------- > > 39.95 0.001567 2 593 openat > > 30.93 0.001213 2 597 close > > 29.12 0.001142 3 365 read > > ------ ----------- ----------- --------- --------- ---------------- > > 100.00 0.003922 1555 total > >=20 > >=20 > > $ strace -e openat,read,close -c lscpu > > ... > > % time seconds usecs/call calls errors syscall > > ------ ----------- ----------- --------- --------- ---------------- > > 44.67 0.001480 7 189 52 openat > > 34.77 0.001152 6 180 read > > 20.56 0.000681 4 140 close > > ------ ----------- ----------- --------- --------- ---------------- > > 100.00 0.003313 509 52 total >=20 > As a "real-world" test, would you recommend me converting one of the > above tools to my implementation of readfile to see how/if it actually > makes sense, or do you have some other tool you would rather see me try= ? See lib/path.c and lib/sysfs.c in util-linux (https://github.com/karelzak= /util-linux).=20 For example ul_path_read() and ul_path_scanf().=20 We use it for lsblk, lsmem, lscpu, etc. =A0$ git grep -c ul_path_read misc-utils/lsblk.c sys-utils/lscpu.c misc-utils/lsblk.c:30 sys-utils/lscpu.c:31 We're probably a little bit off-topic here, no problem to continue on util-linux@vger.kernel.org or by private mails. Thanks! Karel --=20 Karel Zak http://karelzak.blogspot.com