aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/elevator.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/elevator.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r--include/linux/elevator.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 4fd978e7eb83..21a8ebf2dc3a 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -20,7 +20,6 @@ typedef void (elevator_bio_merged_fn) (struct request_queue *,
20typedef int (elevator_dispatch_fn) (struct request_queue *, int); 20typedef int (elevator_dispatch_fn) (struct request_queue *, int);
21 21
22typedef void (elevator_add_req_fn) (struct request_queue *, struct request *); 22typedef void (elevator_add_req_fn) (struct request_queue *, struct request *);
23typedef int (elevator_queue_empty_fn) (struct request_queue *);
24typedef struct request *(elevator_request_list_fn) (struct request_queue *, struct request *); 23typedef struct request *(elevator_request_list_fn) (struct request_queue *, struct request *);
25typedef void (elevator_completed_req_fn) (struct request_queue *, struct request *); 24typedef void (elevator_completed_req_fn) (struct request_queue *, struct request *);
26typedef int (elevator_may_queue_fn) (struct request_queue *, int); 25typedef int (elevator_may_queue_fn) (struct request_queue *, int);
@@ -46,7 +45,6 @@ struct elevator_ops
46 elevator_activate_req_fn *elevator_activate_req_fn; 45 elevator_activate_req_fn *elevator_activate_req_fn;
47 elevator_deactivate_req_fn *elevator_deactivate_req_fn; 46 elevator_deactivate_req_fn *elevator_deactivate_req_fn;
48 47
49 elevator_queue_empty_fn *elevator_queue_empty_fn;
50 elevator_completed_req_fn *elevator_completed_req_fn; 48 elevator_completed_req_fn *elevator_completed_req_fn;
51 49
52 elevator_request_list_fn *elevator_former_req_fn; 50 elevator_request_list_fn *elevator_former_req_fn;
@@ -101,17 +99,16 @@ struct elevator_queue
101 */ 99 */
102extern void elv_dispatch_sort(struct request_queue *, struct request *); 100extern void elv_dispatch_sort(struct request_queue *, struct request *);
103extern void elv_dispatch_add_tail(struct request_queue *, struct request *); 101extern void elv_dispatch_add_tail(struct request_queue *, struct request *);
104extern void elv_add_request(struct request_queue *, struct request *, int, int); 102extern void elv_add_request(struct request_queue *, struct request *, int);
105extern void __elv_add_request(struct request_queue *, struct request *, int, int); 103extern void __elv_add_request(struct request_queue *, struct request *, int);
106extern void elv_insert(struct request_queue *, struct request *, int);
107extern int elv_merge(struct request_queue *, struct request **, struct bio *); 104extern int elv_merge(struct request_queue *, struct request **, struct bio *);
105extern int elv_try_merge(struct request *, struct bio *);
108extern void elv_merge_requests(struct request_queue *, struct request *, 106extern void elv_merge_requests(struct request_queue *, struct request *,
109 struct request *); 107 struct request *);
110extern void elv_merged_request(struct request_queue *, struct request *, int); 108extern void elv_merged_request(struct request_queue *, struct request *, int);
111extern void elv_bio_merged(struct request_queue *q, struct request *, 109extern void elv_bio_merged(struct request_queue *q, struct request *,
112 struct bio *); 110 struct bio *);
113extern void elv_requeue_request(struct request_queue *, struct request *); 111extern void elv_requeue_request(struct request_queue *, struct request *);
114extern int elv_queue_empty(struct request_queue *);
115extern struct request *elv_former_request(struct request_queue *, struct request *); 112extern struct request *elv_former_request(struct request_queue *, struct request *);
116extern struct request *elv_latter_request(struct request_queue *, struct request *); 113extern struct request *elv_latter_request(struct request_queue *, struct request *);
117extern int elv_register_queue(struct request_queue *q); 114extern int elv_register_queue(struct request_queue *q);
@@ -167,6 +164,8 @@ extern struct request *elv_rb_find(struct rb_root *, sector_t);
167#define ELEVATOR_INSERT_BACK 2 164#define ELEVATOR_INSERT_BACK 2
168#define ELEVATOR_INSERT_SORT 3 165#define ELEVATOR_INSERT_SORT 3
169#define ELEVATOR_INSERT_REQUEUE 4 166#define ELEVATOR_INSERT_REQUEUE 4
167#define ELEVATOR_INSERT_FLUSH 5
168#define ELEVATOR_INSERT_SORT_MERGE 6
170 169
171/* 170/*
172 * return values from elevator_may_queue_fn 171 * return values from elevator_may_queue_fn
@@ -195,15 +194,9 @@ enum {
195/* 194/*
196 * io context count accounting 195 * io context count accounting
197 */ 196 */
198#define elv_ioc_count_mod(name, __val) \ 197#define elv_ioc_count_mod(name, __val) this_cpu_add(name, __val)
199 do { \ 198#define elv_ioc_count_inc(name) this_cpu_inc(name)
200 preempt_disable(); \ 199#define elv_ioc_count_dec(name) this_cpu_dec(name)
201 __get_cpu_var(name) += (__val); \
202 preempt_enable(); \
203 } while (0)
204
205#define elv_ioc_count_inc(name) elv_ioc_count_mod(name, 1)
206#define elv_ioc_count_dec(name) elv_ioc_count_mod(name, -1)
207 200
208#define elv_ioc_count_read(name) \ 201#define elv_ioc_count_read(name) \
209({ \ 202({ \