aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 4eb1906cf6c6..8e0b86a9111a 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1380,7 +1380,12 @@ static void cfq_reposition_rq_rb(struct cfq_queue *cfqq, struct request *rq)
1380{ 1380{
1381 elv_rb_del(&cfqq->sort_list, rq); 1381 elv_rb_del(&cfqq->sort_list, rq);
1382 cfqq->queued[rq_is_sync(rq)]--; 1382 cfqq->queued[rq_is_sync(rq)]--;
1383 blkiocg_update_request_remove_stats(&cfqq->cfqg->blkg, rq_data_dir(rq),
1384 rq_is_sync(rq));
1383 cfq_add_rq_rb(rq); 1385 cfq_add_rq_rb(rq);
1386 blkiocg_update_request_add_stats(
1387 &cfqq->cfqg->blkg, &cfqq->cfqd->serving_group->blkg,
1388 rq_data_dir(rq), rq_is_sync(rq));
1384} 1389}
1385 1390
1386static struct request * 1391static struct request *
@@ -1436,6 +1441,8 @@ static void cfq_remove_request(struct request *rq)
1436 cfq_del_rq_rb(rq); 1441 cfq_del_rq_rb(rq);
1437 1442
1438 cfqq->cfqd->rq_queued--; 1443 cfqq->cfqd->rq_queued--;
1444 blkiocg_update_request_remove_stats(&cfqq->cfqg->blkg, rq_data_dir(rq),
1445 rq_is_sync(rq));
1439 if (rq_is_meta(rq)) { 1446 if (rq_is_meta(rq)) {
1440 WARN_ON(!cfqq->meta_pending); 1447 WARN_ON(!cfqq->meta_pending);
1441 cfqq->meta_pending--; 1448 cfqq->meta_pending--;
@@ -1527,6 +1534,7 @@ static void __cfq_set_active_queue(struct cfq_data *cfqd,
1527 if (cfqq) { 1534 if (cfqq) {
1528 cfq_log_cfqq(cfqd, cfqq, "set_active wl_prio:%d wl_type:%d", 1535 cfq_log_cfqq(cfqd, cfqq, "set_active wl_prio:%d wl_type:%d",
1529 cfqd->serving_prio, cfqd->serving_type); 1536 cfqd->serving_prio, cfqd->serving_type);
1537 blkiocg_update_set_active_queue_stats(&cfqq->cfqg->blkg);
1530 cfqq->slice_start = 0; 1538 cfqq->slice_start = 0;
1531 cfqq->dispatch_start = jiffies; 1539 cfqq->dispatch_start = jiffies;
1532 cfqq->allocated_slice = 0; 1540 cfqq->allocated_slice = 0;
@@ -3213,6 +3221,9 @@ static void cfq_insert_request(struct request_queue *q, struct request *rq)
3213 list_add_tail(&rq->queuelist, &cfqq->fifo); 3221 list_add_tail(&rq->queuelist, &cfqq->fifo);
3214 cfq_add_rq_rb(rq); 3222 cfq_add_rq_rb(rq);
3215 3223
3224 blkiocg_update_request_add_stats(&cfqq->cfqg->blkg,
3225 &cfqd->serving_group->blkg, rq_data_dir(rq),
3226 rq_is_sync(rq));
3216 cfq_rq_enqueued(cfqd, cfqq, rq); 3227 cfq_rq_enqueued(cfqd, cfqq, rq);
3217} 3228}
3218 3229