From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: aio poll and a new in-kernel poll API V12 Date: Tue, 22 May 2018 23:07:48 +0100 Message-ID: <20180522220748.GF30522@ZenIV.linux.org.uk> References: <20180522113108.25713-1-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20180522113108.25713-1-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org To: Christoph Hellwig Cc: 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 List-Id: linux-api@vger.kernel.org On Tue, May 22, 2018 at 01:30:37PM +0200, 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. I can live with that, modulo bug in #8 (see reply to that one). There's some nitpicking, but that can be dealt with in followups.