Commit b8522ead3534c6cd06752b47a3bc380956191a2a
Committed by
Linus Torvalds
1 parent
b41eeef14d
Exists in
master
and in
20 other branches
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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
include/linux/aio.h
... | ... | @@ -226,7 +226,8 @@ |
226 | 226 | __put_ioctx(kioctx); \ |
227 | 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 | 231 | /* may be used for debugging */ |
231 | 232 | #define warn_if_async() \ |
232 | 233 | do { \ |