diff options
author | Shaohua Li <shli@fb.com> | 2017-07-12 14:49:56 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-07-29 11:00:03 -0400 |
commit | 35fe6d763229e8fc0eb5f9b93a401673cfcb5e1e (patch) | |
tree | ea38b526a62121671ef7bfff76f7d23e29804b42 /block/bfq-iosched.h | |
parent | 69fd5c391763bd94a40dd152bc72a7f230137150 (diff) |
block: use standard blktrace API to output cgroup info for debug notes
Currently cfq/bfq/blk-throttle output cgroup info in trace in their own
way. Now we have standard blktrace API for this, so convert them to use
it.
Note, this changes the behavior a little bit. cgroup info isn't output
by default, we only do this with 'blk_cgroup' option enabled. cgroup
info isn't output as a string by default too, we only do this with
'blk_cgname' option enabled. Also cgroup info is output in different
position of the note string. I think these behavior changes aren't a big
issue (actually we make trace data shorter which is good), since the
blktrace note is solely for debugging.
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-iosched.h')
-rw-r--r-- | block/bfq-iosched.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h index 63e771ab56d8..1f74d71b45cd 100644 --- a/block/bfq-iosched.h +++ b/block/bfq-iosched.h | |||
@@ -917,13 +917,16 @@ void bfq_add_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq); | |||
917 | struct bfq_group *bfqq_group(struct bfq_queue *bfqq); | 917 | struct bfq_group *bfqq_group(struct bfq_queue *bfqq); |
918 | 918 | ||
919 | #define bfq_log_bfqq(bfqd, bfqq, fmt, args...) do { \ | 919 | #define bfq_log_bfqq(bfqd, bfqq, fmt, args...) do { \ |
920 | blk_add_trace_msg((bfqd)->queue, "bfq%d%c %s " fmt, (bfqq)->pid,\ | 920 | blk_add_cgroup_trace_msg((bfqd)->queue, \ |
921 | bfq_bfqq_sync((bfqq)) ? 'S' : 'A', \ | 921 | bfqg_to_blkg(bfqq_group(bfqq))->blkcg, \ |
922 | bfqq_group(bfqq)->blkg_path, ##args); \ | 922 | "bfq%d%c " fmt, (bfqq)->pid, \ |
923 | bfq_bfqq_sync((bfqq)) ? 'S' : 'A', ##args); \ | ||
923 | } while (0) | 924 | } while (0) |
924 | 925 | ||
925 | #define bfq_log_bfqg(bfqd, bfqg, fmt, args...) \ | 926 | #define bfq_log_bfqg(bfqd, bfqg, fmt, args...) do { \ |
926 | blk_add_trace_msg((bfqd)->queue, "%s " fmt, (bfqg)->blkg_path, ##args) | 927 | blk_add_cgroup_trace_msg((bfqd)->queue, \ |
928 | bfqg_to_blkg(bfqg)->blkcg, fmt, ##args); \ | ||
929 | } while (0) | ||
927 | 930 | ||
928 | #else /* CONFIG_BFQ_GROUP_IOSCHED */ | 931 | #else /* CONFIG_BFQ_GROUP_IOSCHED */ |
929 | 932 | ||