Re: Why add the general notification queue and its sources

From
David Howells <dhowells@redhat.com>
Date
2019-09-05 23:18:36
Also in
keyrings, linux-api, linux-fsdevel, linux-security-module, linux-usb, lkml
Reply to
Linus Torvalds, 2019-09-05
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
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