lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180807090441.67f7e281f502ce448de849c1@linux-foundation.org>
Date:   Tue, 7 Aug 2018 09:04:41 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Christoph Hellwig <hch@....de>
Cc:     viro@...iv.linux.org.uk, Avi Kivity <avi@...lladb.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-aio@...ck.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] aio: allow direct aio poll comletions for keyed
 wakeups

On Tue, 7 Aug 2018 09:25:55 +0200 Christoph Hellwig <hch@....de> wrote:

> 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@....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.

Ah.

> > > +		/* 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.

I meant the comment could explain why it's a trylock instead of a
spin_lock().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ