aio is unlikely
authorAndrew Morton <[email protected]>
Wed, 9 May 2007 09:34:58 +0000 (02:34 -0700)
committerLinus Torvalds <[email protected]>
Wed, 9 May 2007 19:30:54 +0000 (12:30 -0700)
Stick an unlikely() around is_aio(): I assert that most IO is synchronous.

Cc: Suparna Bhattacharya <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Benjamin LaHaise <[email protected]>
Cc: Zach Brown <[email protected]>
Cc: Ulrich Drepper <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/aio.h

index a30ef13c9e622c91bfd7706955758e5932fc639e..43dc2ebfaa0e0e973e9ffca58ba66909ea7e46d0 100644 (file)
@@ -226,7 +226,8 @@ int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
                __put_ioctx(kioctx);                                    \
 } while (0)
 
-#define in_aio() !is_sync_wait(current->io_wait)
+#define in_aio() (unlikely(!is_sync_wait(current->io_wait)))
+
 /* may be used for debugging */
 #define warn_if_async()                                                        \
 do {                                                                   \