aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-28 09:25:44 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-28 09:25:44 -0800
commit7baf398f12585ae77748716fa77113c1f1831153 (patch)
tree492361d848d3dfc33563a1bdf0d0f61b454aac82 /include
parentMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 (diff)
parent[BLOCK] cfq-iosched: seek and async performance fixes (diff)
downloadlinux-dev-7baf398f12585ae77748716fa77113c1f1831153.tar.xz
linux-dev-7baf398f12585ae77748716fa77113c1f1831153.zip
Merge branch 'cfq-merge' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'cfq-merge' of git://brick.kernel.dk/data/git/linux-2.6-block: [BLOCK] cfq-iosched: seek and async performance fixes [PATCH] ll_rw_blk: fix 80-col offender in put_io_context() [PATCH] cfq-iosched: small cfq_choose_req() optimization [PATCH] [BLOCK] cfq-iosched: change cfq io context linking from list to tree
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index c179966f1a2f..d0cac8b58de7 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -55,25 +55,29 @@ struct as_io_context {
struct cfq_queue;
struct cfq_io_context {
- /*
- * circular list of cfq_io_contexts belonging to a process io context
- */
- struct list_head list;
- struct cfq_queue *cfqq[2];
+ struct rb_node rb_node;
void *key;
+ struct cfq_queue *cfqq[2];
+
struct io_context *ioc;
unsigned long last_end_request;
- unsigned long last_queue;
+ sector_t last_request_pos;
+ unsigned long last_queue;
+
unsigned long ttime_total;
unsigned long ttime_samples;
unsigned long ttime_mean;
+ unsigned int seek_samples;
+ u64 seek_total;
+ sector_t seek_mean;
+
struct list_head queue_list;
- void (*dtor)(struct cfq_io_context *);
- void (*exit)(struct cfq_io_context *);
+ void (*dtor)(struct io_context *); /* destructor */
+ void (*exit)(struct io_context *); /* called on task exit */
};
/*
@@ -94,7 +98,7 @@ struct io_context {
int nr_batch_requests; /* Number of requests left in the batch */
struct as_io_context *aic;
- struct cfq_io_context *cic;
+ struct rb_root cic_root;
};
void put_io_context(struct io_context *ioc);