lkml.org 
[lkml]   [2018]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] aio: allow direct aio poll comletions for keyed wakeups
On Mon, Aug 06, 2018 at 03:27:05PM -0700, Andrew Morton wrote:
> On Mon, 6 Aug 2018 10:30:58 +0200 Christoph Hellwig <hch@lst.de> wrote:
>
> > If we get a keyed wakeup for a aio poll waitqueue and wake can acquire the
> > ctx_lock without spinning we can just complete the iocb straight from the
> > wakeup callback to avoid a context switch.
>
> Why do we try to avoid spinning on the lock?

Because we are called with the lock on the waitqueue called, which
nests inside it.

> > + /* try to complete the iocb inline if we can: */
>
> ie, this comment explains 'what" but not "why".
>
> (There's a typo in Subject:, btw)

Because it is faster obviously. I can update the comment.

\
 
 \ /
  Last update: 2018-08-07 09:21    [W:0.111 / U:24.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site