Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752715AbaBCCRo (ORCPT ); Sun, 2 Feb 2014 21:17:44 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:64724 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752586AbaBCCRm (ORCPT ); Sun, 2 Feb 2014 21:17:42 -0500 From: Nathaniel Yazdani 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 18:17:09 -0800 Message-Id: <1391393832-8754-1-git-send-email-n1ght.4nd.d4y@gmail.com> X-Mailer: git-send-email 1.8.4.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 it 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/