diff options
Diffstat (limited to 'block/cfq.h')
-rw-r--r-- | block/cfq.h | 96 |
1 files changed, 58 insertions, 38 deletions
diff --git a/block/cfq.h b/block/cfq.h index 398760194e11..5584e1b63ca8 100644 --- a/block/cfq.h +++ b/block/cfq.h | |||
@@ -4,67 +4,79 @@ | |||
4 | 4 | ||
5 | #ifdef CONFIG_CFQ_GROUP_IOSCHED | 5 | #ifdef CONFIG_CFQ_GROUP_IOSCHED |
6 | static inline void cfq_blkiocg_update_io_add_stats(struct blkio_group *blkg, | 6 | static inline void cfq_blkiocg_update_io_add_stats(struct blkio_group *blkg, |
7 | struct blkio_group *curr_blkg, bool direction, bool sync) | 7 | struct blkio_policy_type *pol, |
8 | struct blkio_group *curr_blkg, | ||
9 | bool direction, bool sync) | ||
8 | { | 10 | { |
9 | blkiocg_update_io_add_stats(blkg, curr_blkg, direction, sync); | 11 | blkiocg_update_io_add_stats(blkg, pol, curr_blkg, direction, sync); |
10 | } | 12 | } |
11 | 13 | ||
12 | static inline void cfq_blkiocg_update_dequeue_stats(struct blkio_group *blkg, | 14 | static inline void cfq_blkiocg_update_dequeue_stats(struct blkio_group *blkg, |
13 | unsigned long dequeue) | 15 | struct blkio_policy_type *pol, unsigned long dequeue) |
14 | { | 16 | { |
15 | blkiocg_update_dequeue_stats(blkg, dequeue); | 17 | blkiocg_update_dequeue_stats(blkg, pol, dequeue); |
16 | } | 18 | } |
17 | 19 | ||
18 | static inline void cfq_blkiocg_update_timeslice_used(struct blkio_group *blkg, | 20 | static inline void cfq_blkiocg_update_timeslice_used(struct blkio_group *blkg, |
19 | unsigned long time, unsigned long unaccounted_time) | 21 | struct blkio_policy_type *pol, unsigned long time, |
22 | unsigned long unaccounted_time) | ||
20 | { | 23 | { |
21 | blkiocg_update_timeslice_used(blkg, time, unaccounted_time); | 24 | blkiocg_update_timeslice_used(blkg, pol, time, unaccounted_time); |
22 | } | 25 | } |
23 | 26 | ||
24 | static inline void cfq_blkiocg_set_start_empty_time(struct blkio_group *blkg) | 27 | static inline void cfq_blkiocg_set_start_empty_time(struct blkio_group *blkg, |
28 | struct blkio_policy_type *pol) | ||
25 | { | 29 | { |
26 | blkiocg_set_start_empty_time(blkg); | 30 | blkiocg_set_start_empty_time(blkg, pol); |
27 | } | 31 | } |
28 | 32 | ||
29 | static inline void cfq_blkiocg_update_io_remove_stats(struct blkio_group *blkg, | 33 | static inline void cfq_blkiocg_update_io_remove_stats(struct blkio_group *blkg, |
30 | bool direction, bool sync) | 34 | struct blkio_policy_type *pol, bool direction, |
35 | bool sync) | ||
31 | { | 36 | { |
32 | blkiocg_update_io_remove_stats(blkg, direction, sync); | 37 | blkiocg_update_io_remove_stats(blkg, pol, direction, sync); |
33 | } | 38 | } |
34 | 39 | ||
35 | static inline void cfq_blkiocg_update_io_merged_stats(struct blkio_group *blkg, | 40 | static inline void cfq_blkiocg_update_io_merged_stats(struct blkio_group *blkg, |
36 | bool direction, bool sync) | 41 | struct blkio_policy_type *pol, bool direction, |
42 | bool sync) | ||
37 | { | 43 | { |
38 | blkiocg_update_io_merged_stats(blkg, direction, sync); | 44 | blkiocg_update_io_merged_stats(blkg, pol, direction, sync); |
39 | } | 45 | } |
40 | 46 | ||
41 | static inline void cfq_blkiocg_update_idle_time_stats(struct blkio_group *blkg) | 47 | static inline void cfq_blkiocg_update_idle_time_stats(struct blkio_group *blkg, |
48 | struct blkio_policy_type *pol) | ||
42 | { | 49 | { |
43 | blkiocg_update_idle_time_stats(blkg); | 50 | blkiocg_update_idle_time_stats(blkg, pol); |
44 | } | 51 | } |
45 | 52 | ||
46 | static inline void | 53 | static inline void |
47 | cfq_blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg) | 54 | cfq_blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg, |
55 | struct blkio_policy_type *pol) | ||
48 | { | 56 | { |
49 | blkiocg_update_avg_queue_size_stats(blkg); | 57 | blkiocg_update_avg_queue_size_stats(blkg, pol); |
50 | } | 58 | } |
51 | 59 | ||
52 | static inline void | 60 | static inline void |
53 | cfq_blkiocg_update_set_idle_time_stats(struct blkio_group *blkg) | 61 | cfq_blkiocg_update_set_idle_time_stats(struct blkio_group *blkg, |
62 | struct blkio_policy_type *pol) | ||
54 | { | 63 | { |
55 | blkiocg_update_set_idle_time_stats(blkg); | 64 | blkiocg_update_set_idle_time_stats(blkg, pol); |
56 | } | 65 | } |
57 | 66 | ||
58 | static inline void cfq_blkiocg_update_dispatch_stats(struct blkio_group *blkg, | 67 | static inline void cfq_blkiocg_update_dispatch_stats(struct blkio_group *blkg, |
59 | uint64_t bytes, bool direction, bool sync) | 68 | struct blkio_policy_type *pol, uint64_t bytes, |
69 | bool direction, bool sync) | ||
60 | { | 70 | { |
61 | blkiocg_update_dispatch_stats(blkg, bytes, direction, sync); | 71 | blkiocg_update_dispatch_stats(blkg, pol, bytes, direction, sync); |
62 | } | 72 | } |
63 | 73 | ||
64 | static inline void cfq_blkiocg_update_completion_stats(struct blkio_group *blkg, uint64_t start_time, uint64_t io_start_time, bool direction, bool sync) | 74 | static inline void cfq_blkiocg_update_completion_stats(struct blkio_group *blkg, |
75 | struct blkio_policy_type *pol, uint64_t start_time, | ||
76 | uint64_t io_start_time, bool direction, bool sync) | ||
65 | { | 77 | { |
66 | blkiocg_update_completion_stats(blkg, start_time, io_start_time, | 78 | blkiocg_update_completion_stats(blkg, pol, start_time, io_start_time, |
67 | direction, sync); | 79 | direction, sync); |
68 | } | 80 | } |
69 | 81 | ||
70 | static inline int cfq_blkiocg_del_blkio_group(struct blkio_group *blkg) | 82 | static inline int cfq_blkiocg_del_blkio_group(struct blkio_group *blkg) |
@@ -74,30 +86,38 @@ static inline int cfq_blkiocg_del_blkio_group(struct blkio_group *blkg) | |||
74 | 86 | ||
75 | #else /* CFQ_GROUP_IOSCHED */ | 87 | #else /* CFQ_GROUP_IOSCHED */ |
76 | static inline void cfq_blkiocg_update_io_add_stats(struct blkio_group *blkg, | 88 | static inline void cfq_blkiocg_update_io_add_stats(struct blkio_group *blkg, |
77 | struct blkio_group *curr_blkg, bool direction, bool sync) {} | 89 | struct blkio_policy_type *pol, |
78 | 90 | struct blkio_group *curr_blkg, bool direction, | |
91 | bool sync) { } | ||
79 | static inline void cfq_blkiocg_update_dequeue_stats(struct blkio_group *blkg, | 92 | static inline void cfq_blkiocg_update_dequeue_stats(struct blkio_group *blkg, |
80 | unsigned long dequeue) {} | 93 | struct blkio_policy_type *pol, unsigned long dequeue) { } |
81 | |||
82 | static inline void cfq_blkiocg_update_timeslice_used(struct blkio_group *blkg, | 94 | static inline void cfq_blkiocg_update_timeslice_used(struct blkio_group *blkg, |
83 | unsigned long time, unsigned long unaccounted_time) {} | 95 | struct blkio_policy_type *pol, unsigned long time, |
84 | static inline void cfq_blkiocg_set_start_empty_time(struct blkio_group *blkg) {} | 96 | unsigned long unaccounted_time) { } |
97 | static inline void cfq_blkiocg_set_start_empty_time(struct blkio_group *blkg, | ||
98 | struct blkio_policy_type *pol) { } | ||
85 | static inline void cfq_blkiocg_update_io_remove_stats(struct blkio_group *blkg, | 99 | static inline void cfq_blkiocg_update_io_remove_stats(struct blkio_group *blkg, |
86 | bool direction, bool sync) {} | 100 | struct blkio_policy_type *pol, bool direction, |
101 | bool sync) { } | ||
87 | static inline void cfq_blkiocg_update_io_merged_stats(struct blkio_group *blkg, | 102 | static inline void cfq_blkiocg_update_io_merged_stats(struct blkio_group *blkg, |
88 | bool direction, bool sync) {} | 103 | struct blkio_policy_type *pol, bool direction, |
89 | static inline void cfq_blkiocg_update_idle_time_stats(struct blkio_group *blkg) | 104 | bool sync) { } |
90 | { | 105 | static inline void cfq_blkiocg_update_idle_time_stats(struct blkio_group *blkg, |
91 | } | 106 | struct blkio_policy_type *pol) { } |
92 | static inline void | 107 | static inline void |
93 | cfq_blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg) {} | 108 | cfq_blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg, |
109 | struct blkio_policy_type *pol) { } | ||
94 | 110 | ||
95 | static inline void | 111 | static inline void |
96 | cfq_blkiocg_update_set_idle_time_stats(struct blkio_group *blkg) {} | 112 | cfq_blkiocg_update_set_idle_time_stats(struct blkio_group *blkg, |
113 | struct blkio_policy_type *pol) { } | ||
97 | 114 | ||
98 | static inline void cfq_blkiocg_update_dispatch_stats(struct blkio_group *blkg, | 115 | static inline void cfq_blkiocg_update_dispatch_stats(struct blkio_group *blkg, |
99 | uint64_t bytes, bool direction, bool sync) {} | 116 | struct blkio_policy_type *pol, uint64_t bytes, |
100 | static inline void cfq_blkiocg_update_completion_stats(struct blkio_group *blkg, uint64_t start_time, uint64_t io_start_time, bool direction, bool sync) {} | 117 | bool direction, bool sync) { } |
118 | static inline void cfq_blkiocg_update_completion_stats(struct blkio_group *blkg, | ||
119 | struct blkio_policy_type *pol, uint64_t start_time, | ||
120 | uint64_t io_start_time, bool direction, bool sync) { } | ||
101 | 121 | ||
102 | static inline int cfq_blkiocg_del_blkio_group(struct blkio_group *blkg) | 122 | static inline int cfq_blkiocg_del_blkio_group(struct blkio_group *blkg) |
103 | { | 123 | { |