diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-11 16:03:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-11 16:03:24 -0400 |
commit | 36805aaea5ae3cf1bb32f1643e0a800bb69f0d5b (patch) | |
tree | 5565132549a0733772b3a2ac6b5cda516ea8cdce /block/elevator.c | |
parent | 6d2fa9e141ea56a571ec842fd4f3a86bea44a203 (diff) | |
parent | d50235b7bc3ee0a0427984d763ea7534149531b4 (diff) |
Merge branch 'for-3.11/core' of git://git.kernel.dk/linux-block
Pull core block IO updates from Jens Axboe:
"Here are the core IO block bits for 3.11. It contains:
- A tweak to the reserved tag logic from Jan, for weirdo devices with
just 3 free tags. But for those it improves things substantially
for random writes.
- Periodic writeback fix from Jan. Marked for stable as well.
- Fix for a race condition in IO scheduler switching from Jianpeng.
- The hierarchical blk-cgroup support from Tejun. This is the grunt
of the series.
- blk-throttle fix from Vivek.
Just a note that I'm in the middle of a relocation, whole family is
flying out tomorrow. Hence I will be awal the remainder of this week,
but back at work again on Monday the 15th. CC'ing Tejun, since any
potential "surprises" will most likely be from the blk-cgroup work.
But it's been brewing for a while and sitting in my tree and
linux-next for a long time, so should be solid."
* 'for-3.11/core' of git://git.kernel.dk/linux-block: (36 commits)
elevator: Fix a race in elevator switching
block: Reserve only one queue tag for sync IO if only 3 tags are available
writeback: Fix periodic writeback after fs mount
blk-throttle: implement proper hierarchy support
blk-throttle: implement throtl_grp->has_rules[]
blk-throttle: Account for child group's start time in parent while bio climbs up
blk-throttle: add throtl_qnode for dispatch fairness
blk-throttle: make throtl_pending_timer_fn() ready for hierarchy
blk-throttle: make tg_dispatch_one_bio() ready for hierarchy
blk-throttle: make blk_throtl_bio() ready for hierarchy
blk-throttle: make blk_throtl_drain() ready for hierarchy
blk-throttle: dispatch from throtl_pending_timer_fn()
blk-throttle: implement dispatch looping
blk-throttle: separate out throtl_service_queue->pending_timer from throtl_data->dispatch_work
blk-throttle: set REQ_THROTTLED from throtl_charge_bio() and gate stats update with it
blk-throttle: implement sq_to_tg(), sq_to_td() and throtl_log()
blk-throttle: add throtl_service_queue->parent_sq
blk-throttle: generalize update_disptime optimization in blk_throtl_bio()
blk-throttle: dispatch to throtl_data->service_queue.bio_lists[]
blk-throttle: move bio_lists[] and friends to throtl_service_queue
...
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/block/elevator.c b/block/elevator.c index eba5b04c29b1..668394d18588 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -150,7 +150,7 @@ void __init load_default_elevator_module(void) | |||
150 | 150 | ||
151 | static struct kobj_type elv_ktype; | 151 | static struct kobj_type elv_ktype; |
152 | 152 | ||
153 | static struct elevator_queue *elevator_alloc(struct request_queue *q, | 153 | struct elevator_queue *elevator_alloc(struct request_queue *q, |
154 | struct elevator_type *e) | 154 | struct elevator_type *e) |
155 | { | 155 | { |
156 | struct elevator_queue *eq; | 156 | struct elevator_queue *eq; |
@@ -170,6 +170,7 @@ err: | |||
170 | elevator_put(e); | 170 | elevator_put(e); |
171 | return NULL; | 171 | return NULL; |
172 | } | 172 | } |
173 | EXPORT_SYMBOL(elevator_alloc); | ||
173 | 174 | ||
174 | static void elevator_release(struct kobject *kobj) | 175 | static void elevator_release(struct kobject *kobj) |
175 | { | 176 | { |
@@ -221,16 +222,7 @@ int elevator_init(struct request_queue *q, char *name) | |||
221 | } | 222 | } |
222 | } | 223 | } |
223 | 224 | ||
224 | q->elevator = elevator_alloc(q, e); | 225 | err = e->ops.elevator_init_fn(q, e); |
225 | if (!q->elevator) | ||
226 | return -ENOMEM; | ||
227 | |||
228 | err = e->ops.elevator_init_fn(q); | ||
229 | if (err) { | ||
230 | kobject_put(&q->elevator->kobj); | ||
231 | return err; | ||
232 | } | ||
233 | |||
234 | return 0; | 226 | return 0; |
235 | } | 227 | } |
236 | EXPORT_SYMBOL(elevator_init); | 228 | EXPORT_SYMBOL(elevator_init); |
@@ -935,16 +927,9 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e) | |||
935 | spin_unlock_irq(q->queue_lock); | 927 | spin_unlock_irq(q->queue_lock); |
936 | 928 | ||
937 | /* allocate, init and register new elevator */ | 929 | /* allocate, init and register new elevator */ |
938 | err = -ENOMEM; | 930 | err = new_e->ops.elevator_init_fn(q, new_e); |
939 | q->elevator = elevator_alloc(q, new_e); | 931 | if (err) |
940 | if (!q->elevator) | ||
941 | goto fail_init; | ||
942 | |||
943 | err = new_e->ops.elevator_init_fn(q); | ||
944 | if (err) { | ||
945 | kobject_put(&q->elevator->kobj); | ||
946 | goto fail_init; | 932 | goto fail_init; |
947 | } | ||
948 | 933 | ||
949 | if (registered) { | 934 | if (registered) { |
950 | err = elv_register_queue(q); | 935 | err = elv_register_queue(q); |