On Wed, Jan 2, 2019 at 9:55 AM Jens Axboe <axboe@xxxxxxxxx> wrote: > > A previous commit deemed it safe to use __set_current_state() for IRQ > driven O_DIRECT, but that's isn't necessarily the case. Be safer and > only apply that optimization to polled IO, where we know the the task is > going to find the completions itself. No. We're just reverting 849a370016a5. There is absolutely no point in trying to avoid a memory barrier that is maybe 15 CPU cycles. Stop this craziness. The optimization is garbage. If you want to save 15 cycles, get rid of code, don't add new code in an area where the block maintainers have already shown that they can't get it right. Linus