diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-04-13 14:03:21 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-13 14:03:21 -0400 |
commit | 4facdaec1ce186e731e6baa04f074804849e9a49 (patch) | |
tree | e521fba8386bf23533cfe21ea5200e615960ec07 /block/cfq-iosched.c | |
parent | a11cdaa7af56423a921a8bdad8f5a5f4ddca918a (diff) | |
parent | 0d0fb0f9c5fddef4a10242fe3337f00f528a3099 (diff) |
Merge branch 'master' into for-2.6.35
Conflicts:
block/blk-cgroup.c
block/cfq-iosched.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 42be3b68d356..9e0df2bdcf21 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright (C) 2003 Jens Axboe <axboe@kernel.dk> | 7 | * Copyright (C) 2003 Jens Axboe <axboe@kernel.dk> |
8 | */ | 8 | */ |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/blkdev.h> | 11 | #include <linux/blkdev.h> |
11 | #include <linux/elevator.h> | 12 | #include <linux/elevator.h> |
12 | #include <linux/jiffies.h> | 13 | #include <linux/jiffies.h> |
@@ -945,6 +946,11 @@ cfq_find_alloc_cfqg(struct cfq_data *cfqd, struct cgroup *cgroup, int create) | |||
945 | unsigned int major, minor; | 946 | unsigned int major, minor; |
946 | 947 | ||
947 | cfqg = cfqg_of_blkg(blkiocg_lookup_group(blkcg, key)); | 948 | cfqg = cfqg_of_blkg(blkiocg_lookup_group(blkcg, key)); |
949 | if (cfqg && !cfqg->blkg.dev && bdi->dev && dev_name(bdi->dev)) { | ||
950 | sscanf(dev_name(bdi->dev), "%u:%u", &major, &minor); | ||
951 | cfqg->blkg.dev = MKDEV(major, minor); | ||
952 | goto done; | ||
953 | } | ||
948 | if (cfqg || !create) | 954 | if (cfqg || !create) |
949 | goto done; | 955 | goto done; |
950 | 956 | ||
@@ -2224,10 +2230,13 @@ static int cfq_forced_dispatch(struct cfq_data *cfqd) | |||
2224 | struct cfq_queue *cfqq; | 2230 | struct cfq_queue *cfqq; |
2225 | int dispatched = 0; | 2231 | int dispatched = 0; |
2226 | 2232 | ||
2227 | while ((cfqq = cfq_get_next_queue_forced(cfqd)) != NULL) | 2233 | /* Expire the timeslice of the current active queue first */ |
2234 | cfq_slice_expired(cfqd, 0); | ||
2235 | while ((cfqq = cfq_get_next_queue_forced(cfqd)) != NULL) { | ||
2236 | __cfq_set_active_queue(cfqd, cfqq); | ||
2228 | dispatched += __cfq_forced_dispatch_cfqq(cfqq); | 2237 | dispatched += __cfq_forced_dispatch_cfqq(cfqq); |
2238 | } | ||
2229 | 2239 | ||
2230 | cfq_slice_expired(cfqd, 0, true); | ||
2231 | BUG_ON(cfqd->busy_queues); | 2240 | BUG_ON(cfqd->busy_queues); |
2232 | 2241 | ||
2233 | cfq_log(cfqd, "forced_dispatch=%d", dispatched); | 2242 | cfq_log(cfqd, "forced_dispatch=%d", dispatched); |