aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2009-12-03 12:59:48 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-12-03 13:28:52 -0500
commit2868ef7b39490e6b41c2c61cd9a5cd891e778b54 (patch)
treee50e169e984d8bd201de2f73f98e31a65c028feb /block/cfq-iosched.c
parentb1c3576961847da26c91b1e97f226bb66be5fa3f (diff)
blkio: Some debugging aids for CFQ
o Some debugging aids for CFQ. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 8bc31a50a57f..662d4e55b3c2 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -341,8 +341,21 @@ CFQ_CFQQ_FNS(coop);
341CFQ_CFQQ_FNS(deep); 341CFQ_CFQQ_FNS(deep);
342#undef CFQ_CFQQ_FNS 342#undef CFQ_CFQQ_FNS
343 343
344#ifdef CONFIG_DEBUG_CFQ_IOSCHED
345#define cfq_log_cfqq(cfqd, cfqq, fmt, args...) \
346 blk_add_trace_msg((cfqd)->queue, "cfq%d%c %s " fmt, (cfqq)->pid, \
347 cfq_cfqq_sync((cfqq)) ? 'S' : 'A', \
348 blkg_path(&(cfqq)->cfqg->blkg), ##args);
349
350#define cfq_log_cfqg(cfqd, cfqg, fmt, args...) \
351 blk_add_trace_msg((cfqd)->queue, "%s " fmt, \
352 blkg_path(&(cfqg)->blkg), ##args); \
353
354#else
344#define cfq_log_cfqq(cfqd, cfqq, fmt, args...) \ 355#define cfq_log_cfqq(cfqd, cfqq, fmt, args...) \
345 blk_add_trace_msg((cfqd)->queue, "cfq%d " fmt, (cfqq)->pid, ##args) 356 blk_add_trace_msg((cfqd)->queue, "cfq%d " fmt, (cfqq)->pid, ##args)
357#define cfq_log_cfqg(cfqd, cfqg, fmt, args...) do {} while (0);
358#endif
346#define cfq_log(cfqd, fmt, args...) \ 359#define cfq_log(cfqd, fmt, args...) \
347 blk_add_trace_msg((cfqd)->queue, "cfq " fmt, ##args) 360 blk_add_trace_msg((cfqd)->queue, "cfq " fmt, ##args)
348 361
@@ -832,6 +845,7 @@ cfq_group_service_tree_del(struct cfq_data *cfqd, struct cfq_group *cfqg)
832 if (cfqg->nr_cfqq) 845 if (cfqg->nr_cfqq)
833 return; 846 return;
834 847
848 cfq_log_cfqg(cfqd, cfqg, "del_from_rr group");
835 cfqg->on_st = false; 849 cfqg->on_st = false;
836 cfqd->nr_groups--; 850 cfqd->nr_groups--;
837 st->total_weight -= cfqg->weight; 851 st->total_weight -= cfqg->weight;
@@ -889,6 +903,9 @@ static void cfq_group_served(struct cfq_data *cfqd, struct cfq_group *cfqg,
889 cfqg->saved_serving_prio = cfqd->serving_prio; 903 cfqg->saved_serving_prio = cfqd->serving_prio;
890 } else 904 } else
891 cfqg->saved_workload_slice = 0; 905 cfqg->saved_workload_slice = 0;
906
907 cfq_log_cfqg(cfqd, cfqg, "served: vt=%llu min_vt=%llu", cfqg->vdisktime,
908 st->min_vdisktime);
892} 909}
893 910
894#ifdef CONFIG_CFQ_GROUP_IOSCHED 911#ifdef CONFIG_CFQ_GROUP_IOSCHED
@@ -3102,7 +3119,7 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
3102 unsigned long now; 3119 unsigned long now;
3103 3120
3104 now = jiffies; 3121 now = jiffies;
3105 cfq_log_cfqq(cfqd, cfqq, "complete"); 3122 cfq_log_cfqq(cfqd, cfqq, "complete rqnoidle %d", !!rq_noidle(rq));
3106 3123
3107 cfq_update_hw_tag(cfqd); 3124 cfq_update_hw_tag(cfqd);
3108 3125