diff options
author | Jens Axboe <axboe@suse.de> | 2006-03-28 01:59:01 -0500 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2006-03-28 01:59:01 -0500 |
commit | e2d74ac0664c89757bde8fb18c98cd7bf53da61c (patch) | |
tree | 1e858044a9180766eae4ec694d4200c4ae850406 /include/linux | |
parent | 329b10bb0feacb7fb9a41389313ff0a51ae56f2a (diff) |
[PATCH] [BLOCK] cfq-iosched: change cfq io context linking from list to tree
On setups with many disks, we spend a considerable amount of time
looking up the process-disk mapping on each queue of io. Testing with
a NULL based block driver, this costs 40-50% reduction in throughput
for 1000 disks.
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/blkdev.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c179966f1a2f..ed0ffa673568 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -55,13 +55,11 @@ struct as_io_context { | |||
55 | 55 | ||
56 | struct cfq_queue; | 56 | struct cfq_queue; |
57 | struct cfq_io_context { | 57 | struct cfq_io_context { |
58 | /* | 58 | struct rb_node rb_node; |
59 | * circular list of cfq_io_contexts belonging to a process io context | ||
60 | */ | ||
61 | struct list_head list; | ||
62 | struct cfq_queue *cfqq[2]; | ||
63 | void *key; | 59 | void *key; |
64 | 60 | ||
61 | struct cfq_queue *cfqq[2]; | ||
62 | |||
65 | struct io_context *ioc; | 63 | struct io_context *ioc; |
66 | 64 | ||
67 | unsigned long last_end_request; | 65 | unsigned long last_end_request; |
@@ -72,8 +70,8 @@ struct cfq_io_context { | |||
72 | 70 | ||
73 | struct list_head queue_list; | 71 | struct list_head queue_list; |
74 | 72 | ||
75 | void (*dtor)(struct cfq_io_context *); | 73 | void (*dtor)(struct io_context *); /* destructor */ |
76 | void (*exit)(struct cfq_io_context *); | 74 | void (*exit)(struct io_context *); /* called on task exit */ |
77 | }; | 75 | }; |
78 | 76 | ||
79 | /* | 77 | /* |
@@ -94,7 +92,7 @@ struct io_context { | |||
94 | int nr_batch_requests; /* Number of requests left in the batch */ | 92 | int nr_batch_requests; /* Number of requests left in the batch */ |
95 | 93 | ||
96 | struct as_io_context *aic; | 94 | struct as_io_context *aic; |
97 | struct cfq_io_context *cic; | 95 | struct rb_root cic_root; |
98 | }; | 96 | }; |
99 | 97 | ||
100 | void put_io_context(struct io_context *ioc); | 98 | void put_io_context(struct io_context *ioc); |