Re: Why add the general notification queue and its sources

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2019-09-05 22:14:39
Also in
keyrings, linux-api, linux-block, linux-fsdevel, linux-usb, lkml
Reply to
David Howells, 2019-09-05
On Thu, Sep 5, 2019 at 2:32 PM David Howells [off-list ref] wrote:
 (1) /dev/watch_queue just implements locked-in-memory buffers.  It gets you
     no events by simply opening it.
Cool. In-memory buffers.

But I know - we *have* one of those. There's already a system call for
it, and has been forever. One that we then extended to allow people to
change the buffer size, and do a lot of other things with.

It's called "pipe()". And you can give the writing side to other user
space processes too, in case you are running an older kernel that
didn't have some "event pipe support". It comes with resource
management, because people already use those things.

If you want to make a message protocol on top of it, it has cool
atomicity guarantees for any message size less than PIPE_BUF, but to
make things simple, maybe just say "fixed record sizes of 64 bytes" or
something like that for events.

Then you can use them from things like perl scripts, not just magical
C programs.

Why do we need a new kind of super-fancy high-speed thing for event reporting?

If you have *so* many events that pipe handling is a performance
issue, you have something seriously wrong going on.

So no. I'm not interested in a magical memory-mapped pipe that is
actually more limited than the real thing.

                  Linus
Thread (35 messages) 35 messages, 8 authors, last reply 2019-09-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help