diff options
author | Tejun Heo | 2013-01-09 08:05:11 -0800 |
---|---|---|
committer | Tejun Heo | 2013-01-09 08:05:11 -0800 |
commit | 7918ffb5b83e3373206ada84873c674fbddf61cc (patch) | |
tree | d7b2fe17efe9453fbb1afbfad8c7fc0e7a6bb01b /lib | |
parent | e71357e118bdd4057e3bc020b9d80fecdd08f588 (diff) |
cfq-iosched: implement cfq_group->nr_active and ->children_weight
To prepare for blkcg hierarchy support, add cfqg->nr_active and
->children_weight. cfqg->nr_active counts the number of active cfqgs
at the cfqg's level and ->children_weight is sum of weights of those
cfqgs. The level covers itself (cfqg->leaf_weight) and immediate
children.
The two values are updated when a cfqg enters and leaves the group
service tree. Unless the hierarchy is very deep, the added overhead
should be negligible.
Currently, the parent is determined using cfqg_flat_parent() which
makes the root cfqg the parent of all other cfqgs. This is to make
the transition to hierarchy-aware scheduling gradual. Scheduling
logic will be converted to use cfqg->children_weight without actually
changing the behavior. When everything is ready,
blkcg_weight_parent() will be replaced with proper parent function.
This patch doesn't introduce any behavior chagne.
v2: s/cfqg->level_weight/cfqg->children_weight/ as per Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions