From: Karel Zak <kzak@redhat.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>, Theodore Ts'o <tytso@mit.edu>,
Christian Brauner <brauner@kernel.org>,
Miklos Szeredi <mszeredi@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Linux API <linux-api@vger.kernel.org>,
linux-man <linux-man@vger.kernel.org>,
LSM <linux-security-module@vger.kernel.org>,
Ian Kent <raven@themaw.net>, David Howells <dhowells@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <christian@brauner.io>,
Amir Goldstein <amir73il@gmail.com>,
James Bottomley <James.Bottomley@hansenpartnership.com>
Subject: Re: [RFC PATCH] getvalues(2) prototype
Date: Fri, 25 Mar 2022 10:25:53 +0100 [thread overview]
Message-ID: <20220325092553.rncxqrjslv6e4c7v@ws.net.home> (raw)
In-Reply-To: <Yj2DPRusMAzV/N5U@kroah.com>
On Fri, Mar 25, 2022 at 09:54:21AM +0100, Greg KH wrote:
> On Fri, Mar 25, 2022 at 09:46:46AM +0100, Karel Zak wrote:
> > 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.
>
> And do those open+read+close syscalls actually show up in measurements?
>
> Again, I tried to find a real-world application that turning those 3
> into 1 would matter, and I couldn't. procps had no decreased system
> load that I could notice. I'll mess with lsof but that's really just a
> stress-test, not anything that is run all the time, right?
Right, the speed of ps(1) or lsof(1) is not important. IMHO the current
discussion about getvalues() goes in wrong direction :-)
I guess the primary motivation is not to replace open+read+close, but
provide to userspace something usable to get information from mount
table, because the current /proc/#/mountinfo and notification by
poll() is horrible.
Don't forget that the previous attempt was fsinfo() from David Howells
(unfortunately, it was too complex and rejected by Linus).
> And as others have said, using io_uring() would also solve the 3 syscall
> issue, but no one seems to want to convert these tools to use that,
> which implies that it's not really an issue for anyone :)
OK, I'll think about it :-)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2022-03-25 9:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 19:27 [RFC PATCH] getvalues(2) prototype Miklos Szeredi
2022-03-22 19:30 ` Miklos Szeredi
2022-03-22 20:36 ` Casey Schaufler
2022-03-22 20:53 ` Casey Schaufler
2022-03-23 7:14 ` Greg KH
2022-03-23 7:16 ` Greg KH
2022-03-23 10:26 ` Bernd Schubert
2022-03-23 11:42 ` Greg KH
2022-03-23 12:06 ` Bernd Schubert
2022-03-23 12:13 ` Greg KH
2022-03-23 19:29 ` J. Bruce Fields
2022-03-23 11:42 ` Christian Brauner
2022-03-23 13:24 ` Miklos Szeredi
2022-03-23 13:38 ` Greg KH
2022-03-23 15:23 ` Miklos Szeredi
2022-03-24 6:56 ` Greg KH
2022-03-23 13:51 ` Casey Schaufler
2022-03-23 14:00 ` Miklos Szeredi
2022-03-23 22:39 ` Casey Schaufler
2022-03-23 22:19 ` Theodore Ts'o
2022-03-24 6:34 ` Christoph Hellwig
2022-03-24 8:44 ` Miklos Szeredi
2022-03-24 16:15 ` Eric W. Biederman
2022-03-25 8:46 ` Karel Zak
2022-03-25 8:54 ` Greg KH
2022-03-25 9:25 ` Karel Zak [this message]
2022-03-26 4:19 ` Theodore Ts'o
2022-03-25 18:40 ` Linus Torvalds
2022-03-25 11:02 ` Cyril Hrubis
2022-03-23 22:58 ` Dave Chinner
2022-03-23 23:17 ` Casey Schaufler
2022-03-24 8:57 ` Miklos Szeredi
2022-03-24 10:34 ` Amir Goldstein
2022-03-24 20:31 ` Dave Chinner
2022-03-25 9:10 ` Karel Zak
2022-03-25 16:42 ` Trond Myklebust
2022-03-27 21:03 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220325092553.rncxqrjslv6e4c7v@ws.net.home \
--to=kzak@redhat.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=christian@brauner.io \
--cc=dhowells@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@redhat.com \
--cc=raven@themaw.net \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).