On 11/13/18 8:58 AM, Jens Axboe wrote: > On 11/13/18 8:52 AM, Keith Busch wrote: >> On Tue, Nov 13, 2018 at 08:42:28AM -0700, Jens Axboe wrote: >>> If we're polling for IO on a device that doesn't use interrupts, then >>> IO completion loop (and wake of task) is done by submitting task itself. >>> If that is the case, then we don't need to enter the wake_up_process() >>> function, we can simply mark ourselves as TASK_RUNNING. >>> >>> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> >>> --- >>> fs/block_dev.c | 6 ++---- >>> fs/iomap.c | 3 +-- >>> include/linux/blkdev.h | 19 +++++++++++++++++++ >>> 3 files changed, 22 insertions(+), 6 deletions(-) >> >> One more for swap read: >> >> --- >> diff --git a/mm/page_io.c b/mm/page_io.c >> index d4d1c89bcddd..57572ff46016 100644 >> --- a/mm/page_io.c >> +++ b/mm/page_io.c >> @@ -140,7 +140,7 @@ static void end_swap_bio_read(struct bio *bio) >> unlock_page(page); >> WRITE_ONCE(bio->bi_private, NULL); >> bio_put(bio); >> - wake_up_process(waiter); >> + blk_wake_io_task(waiter); >> put_task_struct(waiter); >> } >> > > Indeed, thanks Keith! I'll fold it in. Ditto for the patch 5 changes, jfyi. -- Jens Axboe