summaryrefslogtreecommitdiffstats
path: root/block/cfq.h
blob: c8b15ef57e5dee494fd78473529d437ba1d4e02f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#ifndef _CFQ_H
#define _CFQ_H
#include "blk-cgroup.h"

#ifdef CONFIG_CFQ_GROUP_IOSCHED
static inline void cfq_blkiocg_update_io_add_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol,
			struct blkio_group *curr_blkg,
			bool direction, bool sync)
{
	blkiocg_update_io_add_stats(blkg, pol, curr_blkg, direction, sync);
}

static inline void cfq_blkiocg_update_dequeue_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol, unsigned long dequeue)
{
	blkiocg_update_dequeue_stats(blkg, pol, dequeue);
}

static inline void cfq_blkiocg_update_timeslice_used(struct blkio_group *blkg,
			struct blkio_policy_type *pol, unsigned long time,
			unsigned long unaccounted_time)
{
	blkiocg_update_timeslice_used(blkg, pol, time, unaccounted_time);
}

static inline void cfq_blkiocg_set_start_empty_time(struct blkio_group *blkg,
			struct blkio_policy_type *pol)
{
	blkiocg_set_start_empty_time(blkg, pol);
}

static inline void cfq_blkiocg_update_io_remove_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol, bool direction,
			bool sync)
{
	blkiocg_update_io_remove_stats(blkg, pol, direction, sync);
}

static inline void cfq_blkiocg_update_io_merged_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol, bool direction,
			bool sync)
{
	blkiocg_update_io_merged_stats(blkg, pol, direction, sync);
}

static inline void cfq_blkiocg_update_idle_time_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol)
{
	blkiocg_update_idle_time_stats(blkg, pol);
}

static inline void
cfq_blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol)
{
	blkiocg_update_avg_queue_size_stats(blkg, pol);
}

static inline void
cfq_blkiocg_update_set_idle_time_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol)
{
	blkiocg_update_set_idle_time_stats(blkg, pol);
}

static inline void cfq_blkiocg_update_dispatch_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol, uint64_t bytes,
			bool direction, bool sync)
{
	blkiocg_update_dispatch_stats(blkg, pol, bytes, direction, sync);
}

static inline void cfq_blkiocg_update_completion_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol, uint64_t start_time,
			uint64_t io_start_time, bool direction, bool sync)
{
	blkiocg_update_completion_stats(blkg, pol, start_time, io_start_time,
					direction, sync);
}

#else /* CFQ_GROUP_IOSCHED */
static inline void cfq_blkiocg_update_io_add_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol,
			struct blkio_group *curr_blkg, bool direction,
			bool sync) { }
static inline void cfq_blkiocg_update_dequeue_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol, unsigned long dequeue) { }
static inline void cfq_blkiocg_update_timeslice_used(struct blkio_group *blkg,
			struct blkio_policy_type *pol, unsigned long time,
			unsigned long unaccounted_time) { }
static inline void cfq_blkiocg_set_start_empty_time(struct blkio_group *blkg,
			struct blkio_policy_type *pol) { }
static inline void cfq_blkiocg_update_io_remove_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol, bool direction,
			bool sync) { }
static inline void cfq_blkiocg_update_io_merged_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol, bool direction,
			bool sync) { }
static inline void cfq_blkiocg_update_idle_time_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol) { }
static inline void
cfq_blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg,
					struct blkio_policy_type *pol) { }

static inline void
cfq_blkiocg_update_set_idle_time_stats(struct blkio_group *blkg,
				       struct blkio_policy_type *pol) { }

static inline void cfq_blkiocg_update_dispatch_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol, uint64_t bytes,
			bool direction, bool sync) { }
static inline void cfq_blkiocg_update_completion_stats(struct blkio_group *blkg,
			struct blkio_policy_type *pol, uint64_t start_time,
			uint64_t io_start_time, bool direction, bool sync) { }

#endif /* CFQ_GROUP_IOSCHED */
#endif
OpenPOWER on IntegriCloud