Re: [PATCH 06/11] block: add polled wakeup task helper
From: Jens Axboe <axboe@kernel.dk>
Date: 2018-11-13 15:58:42
On 11/13/18 8:52 AM, Keith Busch wrote:
quoted hunk ↗ jump to hunk
On Tue, Nov 13, 2018 at 08:42:28AM -0700, Jens Axboe wrote:quoted
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@kernel.dk> --- 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. -- Jens Axboe