aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <[email protected]>2007-05-09 02:34:58 -0700
committerLinus Torvalds <[email protected]>2007-05-09 12:30:54 -0700
commitb8522ead3534c6cd06752b47a3bc380956191a2a (patch)
tree748ff93b4d5a49e6e21392c30ecad143694dcd94 /include/linux
parentb41eeef14d7c73af6d16c7d02b7a939082a137ff (diff)
aio is unlikely
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]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/aio.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h
index a30ef13c9e62..43dc2ebfaa0e 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -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 { \