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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 8 Aug 2018 11:57:19 +0200
From:   Christoph Hellwig <>
To:     Andrew Morton <>
Cc:     Christoph Hellwig <>,,
        Avi Kivity <>,
        Linus Torvalds <>,,,
Subject: Re: [PATCH 4/4] aio: allow direct aio poll comletions for keyed

On Tue, Aug 07, 2018 at 09:04:41AM -0700, Andrew Morton wrote:
> > 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().

We could something like this the patch below.

Al, do you want me to resend or can you just fold it in?

diff --git a/fs/aio.c b/fs/aio.c
index 5943098a87c6..84df2c2bf80b 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1684,7 +1684,8 @@ static int aio_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync,
 		 * Try to complete the iocb inline if we can to avoid a costly
-		 * context switch.
+		 * context switch.  As the waitqueue lock nests inside the ctx
+		 * lock we can only do that if we can get it without waiting.
 		if (spin_trylock(&iocb->ki_ctx->ctx_lock)) {

Powered by blists - more mailing lists