Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbeAJWg3 (ORCPT + 1 other); Wed, 10 Jan 2018 17:36:29 -0500 Received: from mail-pg0-f51.google.com ([74.125.83.51]:37737 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750782AbeAJWg1 (ORCPT ); Wed, 10 Jan 2018 17:36:27 -0500 X-Google-Smtp-Source: ACJfBovvsaOqByLX5PLtOrDJh7VuKf2uD9YYmGUVBqmRdEcOBAXbJdv65x+FWJqw6kTpRll3so3QCA== Cc: mtk.manpages@gmail.com, Avi Kivity , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: aio poll, io_pgetevents and a new in-kernel poll API V2 To: Christoph Hellwig , viro@zeniv.linux.org.uk References: <20180110155853.32348-1-hch@lst.de> From: "Michael Kerrisk (man-pages)" Message-ID: <7eda0558-dc70-2d0c-5eca-ca4c3036585d@gmail.com> Date: Wed, 10 Jan 2018 23:36:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180110155853.32348-1-hch@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Christoph, On 01/10/2018 04:58 PM, Christoph Hellwig wrote: > Hi all, > > this series adds support for the IOCB_CMD_POLL operation to poll for the > readyness of file descriptors using the aio subsystem. The API is based > on patches that existed in RHAS2.1 and RHEL3, which means it already is > supported by libaio. To implement the poll support efficiently new > methods to poll are introduced in struct file_operations: get_poll_head > and poll_mask. The first one returns a wait_queue_head to wait on > (lifetime is bound by the file), and the second does a non-blocking > check for the POLL* events. This allows aio poll to work without > any additional context switches, unlike epoll. > > To make the interface fully useful a new io_pgetevents system call is > added, which atomically saves and restores the signal mask over the > io_pgetevents system call. It it the logical equivalent to pselect and > ppoll for io_pgetevents. > > The corresponding libaio changes for io_pgetevents support and > documentation, as well as a test case will be posted in a separate > series. > > The changes were sponsored by Scylladb, and improve performance > of the seastar framework up to 10%, while also removing the need > for a privileged SCHED_FIFO epoll listener thread. > > The patches are on top of Als __poll_t annoations, so I've also > prepared a git branch on top of those here: > > git://git.infradead.org/users/hch/vfs.git aio-poll > > Gitweb: > > http://git.infradead.org/users/hch/vfs.git/shortlog/refs/heads/aio-poll.2 > > Libaio changes: > > http://git.infradead.org/users/hch/libaio.git/shortlog/refs/heads/aio-poll > > Seastar changes: > > https://github.com/avikivity/seastar/commits/aio > > Changes since V1: > - handle the NULL ->poll case in vfs_poll > - dropped the file argument to the ->poll_mask socket operation > - replace the ->pre_poll socket operation with ->get_poll_head as > in the file operations Are there some man pages patches already for these changes? Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/