diff options
author | Andrew Morton <akpm@osdl.org> | 2007-05-09 05:34:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 15:30:54 -0400 |
commit | b8522ead3534c6cd06752b47a3bc380956191a2a (patch) | |
tree | 748ff93b4d5a49e6e21392c30ecad143694dcd94 /include/linux/aio.h | |
parent | b41eeef14d7c73af6d16c7d02b7a939082a137ff (diff) |
aio is unlikely
Stick an unlikely() around is_aio(): I assert that most IO is synchronous.
Cc: Suparna Bhattacharya <suparna@in.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/aio.h')
-rw-r--r-- | include/linux/aio.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index a30ef13c9e6..43dc2ebfaa0 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, | |||
226 | __put_ioctx(kioctx); \ | 226 | __put_ioctx(kioctx); \ |
227 | } while (0) | 227 | } while (0) |
228 | 228 | ||
229 | #define in_aio() !is_sync_wait(current->io_wait) | 229 | #define in_aio() (unlikely(!is_sync_wait(current->io_wait))) |
230 | |||
230 | /* may be used for debugging */ | 231 | /* may be used for debugging */ |
231 | #define warn_if_async() \ | 232 | #define warn_if_async() \ |
232 | do { \ | 233 | do { \ |