4 #include <linux/radix-tree.h>
7 * This is the per-process anticipatory I/O scheduler state.
12 void (*dtor
)(struct as_io_context
*aic
); /* destructor */
13 void (*exit
)(struct as_io_context
*aic
); /* called on task exit */
16 atomic_t nr_queued
; /* queued reads & sync writes */
17 atomic_t nr_dispatched
; /* number of requests gone to the drivers */
19 /* IO History tracking */
21 unsigned long last_end_request
;
22 unsigned long ttime_total
;
23 unsigned long ttime_samples
;
24 unsigned long ttime_mean
;
26 unsigned int seek_samples
;
27 sector_t last_request_pos
;
33 struct cfq_io_context
{
35 unsigned long dead_key
;
37 struct cfq_queue
*cfqq
[2];
39 struct io_context
*ioc
;
41 unsigned long last_end_request
;
42 sector_t last_request_pos
;
44 unsigned long ttime_total
;
45 unsigned long ttime_samples
;
46 unsigned long ttime_mean
;
48 unsigned int seek_samples
;
52 struct list_head queue_list
;
53 <<<<<<< HEAD
:include
/linux
/iocontext
.h
55 struct hlist_node cic_list
;
56 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:include
/linux
/iocontext
.h
58 void (*dtor
)(struct io_context
*); /* destructor */
59 void (*exit
)(struct io_context
*); /* called on task exit */
63 * I/O subsystem state of the associated processes. It is refcounted
64 * and kmalloc'ed. These could be shared between processes.
70 /* all the fields below are protected by this lock */
73 unsigned short ioprio
;
74 unsigned short ioprio_changed
;
77 * For request batching
79 unsigned long last_waited
; /* Time last woken after wait for request */
80 int nr_batch_requests
; /* Number of requests left in the batch */
82 struct as_io_context
*aic
;
83 struct radix_tree_root radix_root
;
84 <<<<<<< HEAD
:include
/linux
/iocontext
.h
86 struct hlist_head cic_list
;
87 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:include
/linux
/iocontext
.h
91 static inline struct io_context
*ioc_task_link(struct io_context
*ioc
)
94 * if ref count is zero, don't allow sharing (ioc is going away, it's
97 if (ioc
&& atomic_inc_not_zero(&ioc
->refcount
))