Skip to content

Commit

Permalink
aio is unlikely
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed May 9, 2007
1 parent b41eeef commit b8522ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/aio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 { \
Expand Down

0 comments on commit b8522ea

Please sign in to comment.