> > -#define in_aio() !is_sync_wait(current->io_wait)> > +#define in_aio() (unlikely(!is_sync_wait(current->io_wait)))> > Please revert. Workload-dependent "likelihood" should not cause > programmers to add such markers.> > This is a common misunderstanding about unlikely() and likely(). The > branch prediction used for each assumes 99% unlikely or 99% likely, > which is not true at all for workload-dependent code.> > Even if only 1% of Linux users use AIO, for that 1%, the 'unlikely' > marker causes repeated branch mispredictions.> > likely() and unlikely() should be used for cases where code is > likely/unlikely for EVERYBODY.