Re: [RFC] Add a new generic system call which has better performance, to get /proc data, than existing mechanisms

From: Greg KH
Date: Thu Nov 17 2022 - 16:42:42 EST


On Wed, Nov 16, 2022 at 10:37:24AM -0800, Anjali Kulkarni wrote:
> Currently, reading from /proc is an expensive operation, for a
> performance sensitive application

Then perhaps "performance sensitive applications" should not be reading
10's of thousands of /proc files?

Anyway, your proposal comes up every few years, in different ways.
Please research the past proposals for why this keeps failing and
perhaps you should just fix up your userspace code instead?

Also, look at attempts like the introduction of the readfile syscall as
well, if you want to remove the open/read/close set of syscalls into
one, but even that isn't all that useful for real-world applications, as
you can today use the io_uring api to achieve almost the same throughput
if really needed.

good luck!

greg k-h