linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathaniel Yazdani <n1ght.4nd.d4y@gmail.com>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/3] epoll: read(),write(),ioctl() interface
Date: Sun,  2 Feb 2014 16:30:27 -0800	[thread overview]
Message-ID: <1391387430-6526-1-git-send-email-n1ght.4nd.d4y@gmail.com> (raw)

Hi everyone,

This patch series adds support for read(), write(), and ioctl() operations
on eventpolls as well as an associated userspace structure to format the
eventpoll entries delivered via read()/write() buffers. The new structure,
struct epoll, differs from struct epoll_event mainly in that struct epoll
also holds the associated file descriptor. Using the normal I/O interface
to manipulate eventpolls is much neater than using epoll-specific syscalls
while also allowing for greater flexibility (theoretically, pipes could
be used to filter access). Specifically, write() creates, modifies, and/or
removes event entries stored in the supplied buffer, using the userspace
identifier to check whether an entry exists and removing it if no events
are set to trigger it, while read() simply waits for enough events to fill
the provided buffer. As timeout control is essential for polling to be
practical, ioctl() is used to configure an optional timeout, which is
infinite by default.

 Documentation/ioctl/ioctl-number.txt |   1 +
 fs/eventpoll.c                       | 534 ++++++++++++++++++++++++-----------
 include/uapi/linux/eventpoll.h       |  10 +
 3 files changed, 384 insertions(+), 161 deletions(-)

             reply	other threads:[~2014-02-03  0:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03  0:30 Nathaniel Yazdani [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-02-03  2:17 [RFC PATCH 0/3] epoll: read(),write(),ioctl() interface Nathaniel Yazdani
2014-02-03  9:43 ` Clemens Ladisch
2014-02-03 19:34   ` Nathaniel Yazdani
2014-02-03 19:33 ` Andy Lutomirski
2014-02-03 19:42   ` Nathaniel Yazdani
2014-02-03 19:56     ` Andy Lutomirski
2014-02-03 21:51       ` Eric Wong
2014-02-03 22:06         ` Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391387430-6526-1-git-send-email-n1ght.4nd.d4y@gmail.com \
    --to=n1ght.4nd.d4y@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).