lkml.org 
[lkml]   [2020]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [GIT PULL] General notification queue and key notifications
    [ Finally getting around to this since my normal pull queue is now empty ]

    On Wed, Jun 10, 2020 at 4:13 AM Karel Zak <kzak@redhat.com> wrote:
    >
    > The notification stuff looks pretty promising, but I do not understand
    > why we need to use pipe for this purpose

    The original intent was never to use the "pipe()" system call itself,
    only use pipes as the actual transport mechanism (because I do not for
    a second believe in the crazy "use sockets" model that a lot of other
    people seem to blindly believe in).

    But using "pipe()" also allows for non-kernel notification queues (ie
    where the events come from a user space process). Then you'd not use
    O_NOTIFICATION_PIPE, but O_DIRECT (for a packetized pipe).

    > Is it because we need to create a new file descriptor from nothing?
    > Why O_NOTIFICATION_PIPE is better than introduce a new syscall
    > notifyfd()?

    We could eventually introduce a new system call.

    But I most definitely did *NOT* want to see anything like that for any
    first gen stuff. Especially since it wasn't clear who was going to
    use it, and whether early trials would literally be done with that
    user-space emulation model of using a perfectly regular pipe (just
    with packetization).

    I'm not even convinced O_NOTIFICATION_PIPE is necessary, but at worst
    it will be a useful marker. I think the only real reason for it was to
    avoid any clashes with splice(), which has more complex use of the
    pipe buffers.

    I'm so far just reading this thread and the arguments for users, and I
    haven't yet looked at all the actual details in the pull request - but
    last time I had objections to things it wasn't the code, it was the
    lack of any use.

    Linus

    \
     
     \ /
      Last update: 2020-06-12 23:33    [W:7.254 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site