bfq-iosched: stop using blkg->stat_bytes and ->stat_ios
authorTejun Heo <tj@kernel.org>
Thu, 7 Nov 2019 19:18:00 +0000 (11:18 -0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 Nov 2019 19:28:13 +0000 (12:28 -0700)
commitfd41e60331b13b8fb35cc5048185a46de98db77c
tree3931df1952e9799ac7f8858932816c618304ffad
parenta557f1c7fee2f2059234647fea32ed1f3c07dce2
bfq-iosched: stop using blkg->stat_bytes and ->stat_ios

When used on cgroup1, bfq uses the blkg->stat_bytes and ->stat_ios
from blk-cgroup core to populate six stat knobs.  blk-cgroup core is
moving away from blkg_rwstat to improve scalability and won't be able
to support this usage.

It isn't like the sharing gains all that much.  Let's break it out to
dedicated rwstat counters which are updated when on cgroup1.  This
makes use of bfqg_*rwstat*() helpers outside of
CONFIG_BFQ_CGROUP_DEBUG.  Move them out.

v2: Compile fix when !CONFIG_BFQ_CGROUP_DEBUG.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-cgroup.c
block/bfq-iosched.c
block/bfq-iosched.h