Thread (35 messages) 35 messages, 8 authors, 2019-09-06

Re: Why add the general notification queue and its sources

flat view

From: David Howells <dhowells@redhat.com>
Date: 2019-09-05 23:18:36
Also in: keyrings, linux-block, linux-fsdevel, linux-security-module, linux-usb, lkml

Linus Torvalds [off-list ref] wrote:
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.
Can you write into a pipe from softirq context and/or with spinlocks held
and/or with the RCU read lock held?  That is a requirement.  Another is that
messages get inserted whole or not at all (or if they are truncated, the size
field gets updated).

Since one end would certainly be attached to an fd, it looks on the face of it
that writing into the pipe would require taking pipe->mutex.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help