The patch titled Subject: mm/page_io.c: fix polled swap page in has been added to the -mm tree. Its filename is mm-fix-polled-swap-page-in.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-fix-polled-swap-page-in.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-fix-polled-swap-page-in.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jens Axboe <axboe@xxxxxxxxx> Subject: mm/page_io.c: fix polled swap page in swap_readpage() wants to do polling to bring in pages if asked to, but it doesn't mark the bio as being polled. Additionally, the looping around the blk_poll() check isn't correct - if we get a zero return, we should call io_schedule(), we can't just assume that the bio has completed. The regular bio->bi_private check should be used for that. Link: http://lkml.kernel.org/r/e15243a8-2cdf-c32c-ecee-f289377c8ef9@xxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/mm/page_io.c~mm-fix-polled-swap-page-in +++ a/mm/page_io.c @@ -401,6 +401,8 @@ int swap_readpage(struct page *page, boo get_task_struct(current); bio->bi_private = current; bio_set_op_attrs(bio, REQ_OP_READ, 0); + if (synchronous) + bio->bi_opf |= REQ_HIPRI; count_vm_event(PSWPIN); bio_get(bio); qc = submit_bio(bio); @@ -410,7 +412,7 @@ int swap_readpage(struct page *page, boo break; if (!blk_poll(disk->queue, qc)) - break; + io_schedule(); } __set_current_state(TASK_RUNNING); bio_put(bio); _ Patches currently in -mm which might be from axboe@xxxxxxxxx are mm-fix-polled-swap-page-in.patch