aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2011-08-02 03:24:09 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-08-02 03:24:09 -0400
commita5395b83b78f62ccf5e3af854aacd025c2a6e7b5 (patch)
tree9705672ce8d806582abe667f06b4d302954b1795 /block
parente5a94f56845bb4b272d82e84b5a1e2080b07ba82 (diff)
cfq-iosched: Reduce linked group count upon group destruction
FQ keeps track of number of groups which are linked on blkcg->blkg_list. This is useful to avoid races between queue exit and cgroup exit code paths. So if at the request queue exit time linked group count is not zero, that means there are some group out there which is yet to be deleted under rcu read period and queue exit code should wait for on rcu period. In my previous patch I forgot to decrease the number of group count. So in current form, we nr_blkcg_linked_grps is always non-zero and we will always wait one rcu period (if BLK_CGROUP=y). The side effect of this is that it can increase boot time. I am surprised, nobody complained so far. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 1f96ad6254f..65083453760 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1209,6 +1209,9 @@ static void cfq_destroy_cfqg(struct cfq_data *cfqd, struct cfq_group *cfqg)
1209 1209
1210 hlist_del_init(&cfqg->cfqd_node); 1210 hlist_del_init(&cfqg->cfqd_node);
1211 1211
1212 BUG_ON(cfqd->nr_blkcg_linked_grps <= 0);
1213 cfqd->nr_blkcg_linked_grps--;
1214
1212 /* 1215 /*
1213 * Put the reference taken at the time of creation so that when all 1216 * Put the reference taken at the time of creation so that when all
1214 * queues are gone, group can be destroyed. 1217 * queues are gone, group can be destroyed.