[lkml]   [2018]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: aio poll, io_pgetevents and a new in-kernel poll API V4
On Thu, Jan 25, 2018 at 03:10:25PM -0500, Benjamin LaHaise wrote:
> I implemented something similar back in December, but did so without
> changing the in-kernel poll API. See below for the patch that implements
> it. Is changing the in-kernel poll API really desirable given how many
> drivers that will touch?

I had various previous versions that did not touch the driver API,
but there are a couple issues with that:

(1) you cannot make the API race free. With the existing convoluted
poll_table_struct-based API you can't check for pending items
before adding yourself to the waitqueue in a race free manner.
(2) you cannot make the submit non-blocking without deferring to
a workqueue or similar and thus incurring another context switch
(3) you cannot deliver events from the wakeup callback, incurring
another context switch, this time in the wakeup path that actually
matters for some applications
(3) the in-kernel poll API really is broken to start with and needs
to be fixed anyway. I'd rather rely on that instead of working
around decades old cruft that has no reason to exist.

 \ /
  Last update: 2018-01-26 13:32    [W:0.139 / U:0.568 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site