block: don't do cgroup accounting for split bio's
Subsystems (2)
Josef Bacik
maintainerPATCH 1/1 block: don't do cgroup accounting for split bio's
We need to check in blkcg_bio_issue_check if the bio is flagged as QUEUE_ENTERED, because if it is then we've already accounted for the IO in the cgroup stats.
--- include/linux/blk-cgroup.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/blk-cgroup.h +2 -1
@@ -767,7 +767,8 @@ static inline bool blkcg_bio_issue_check(struct request_queue *q, throtl =blk_throtl_bio (q, blkg, bio); -if (!throtl) { +if (!throtl && + !bio_flagged (bio,BIO_QUEUE_ENTERED )) { blkg = blkg ?: q->root_blkg;blkg_rwstat_add (&blkg->stat_bytes, bio->bi_opf, bio->bi_iter.bi_size);
Signature · 1 line
2.14.3
Jens Axboe
maintainerQuoted 3 lines · Josef Bacik
We need to check in
blkcg_bio_issue_checkif the bio is flagged asQUEUE_ENTERED, because if it is then we've already accounted for the IO in the cgroup stats.
That's a bit of a flag overload, I think that at least warrants a comment.
Signature · 1 line
Jens Axboe
Josef Bacik
maintainerQuoted 7 lines · Jens Axboe
Quoted 3 lines · Josef Bacik
We need to check in
blkcg_bio_issue_checkif the bio is flagged asQUEUE_ENTERED, because if it is then we've already accounted for the IO in the cgroup stats.That's a bit of a flag overload, I think that at least warrants a comment.
Yeah I'm not a fan of it, but there's nothing else to indicate that the bio is a split bio other than checking if it's endio is the chain endio. I'll respin with the comment. Thanks,
Josef