mm/page_io.c: annotate refault stalls from swap_readpage

If a block device supports rw_page operation, it doesn't submit bios so
the annotation in submit_bio() for refault stall doesn't work.  It
happens with zram in android, especially swap read path which could
consume CPU cycle for decompress.  It is also a problem for zswap which
uses frontswap.

Annotate swap_readpage() to account the synchronous IO overhead to
prevent underreport memory pressure.

[ add comment, per Johannes]
Signed-off-by: Minchan Kim <>
Acked-by: Johannes Weiner <>
Reviewed-by: Shakeel Butt <>
Cc: Seth Jennings <>
Cc: Dan Streetman <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
1 file changed