block: annotate refault stalls from IO submission
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 8 Aug 2019 19:03:00 +0000 (15:03 -0400)
committerJens Axboe <axboe@kernel.dk>
Wed, 14 Aug 2019 14:50:01 +0000 (08:50 -0600)
commitb8e24a9300b0836a9d39f6b20746766b3b81f1bd
tree2b992e084f3e88eca44d34c427745fed595e6149
parent73d9c8d4c0017e21e1ff519474ceb1450484dc9a
block: annotate refault stalls from IO submission

psi tracks the time tasks wait for refaulting pages to become
uptodate, but it does not track the time spent submitting the IO. The
submission part can be significant if backing storage is contended or
when cgroup throttling (io.latency) is in effect - a lot of time is
spent in submit_bio(). In that case, we underreport memory pressure.

Annotate submit_bio() to account submission time as memory stall when
the bio is reading userspace workingset pages.

Tested-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
block/blk-core.c
include/linux/blk_types.h