diff options
author | Jan Kara <jack@suse.cz> | 2021-11-25 16:36:35 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-11-29 16:38:51 +0300 |
commit | 98f044999ba141a6b6b79cb3a996a73f05a46820 (patch) | |
tree | f9787d55582480672940a7edae00c4e22ebaed6e /block/bfq-iosched.h | |
parent | 790cf9c84837b232eb413b8b6b5d57817176cb23 (diff) | |
download | linux-98f044999ba141a6b6b79cb3a996a73f05a46820.tar.xz |
bfq: Track number of allocated requests in bfq_entity
When we want to limit number of requests used by each bfqq and also
cgroup, we need to track also number of requests used by each cgroup.
So track number of allocated requests for each bfq_entity.
Acked-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20211125133645.27483-2-jack@suse.cz
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-iosched.h')
-rw-r--r-- | block/bfq-iosched.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h index a73488eec8a4..3787cfb0febb 100644 --- a/block/bfq-iosched.h +++ b/block/bfq-iosched.h @@ -170,6 +170,9 @@ struct bfq_entity { /* budget, used also to calculate F_i: F_i = S_i + @budget / @weight */ int budget; + /* Number of requests allocated in the subtree of this entity */ + int allocated; + /* device weight, if non-zero, it overrides the default weight of * bfq_group_data */ int dev_weight; @@ -266,8 +269,6 @@ struct bfq_queue { struct request *next_rq; /* number of sync and async requests queued */ int queued[2]; - /* number of requests currently allocated */ - int allocated; /* number of pending metadata requests */ int meta_pending; /* fifo list of requests in sort_list */ |