Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: cdrom: support devices that have check_events but not media_changed cfq-iosched: Don't wait if queue already has requests. blkio-throttle: Avoid calling blkiocg_lookup_group() for root group cfq: rename a function to give it more appropriate name cciss: make cciss_revalidate not loop through CISS_MAX_LUNS volumes unnecessarily. drivers/block/aoe/Makefile: replace the use of <module>-objs with <module>-y loop: queue_lock NULL pointer derefence in blk_throtl_exit drivers/block/Makefile: replace the use of <module>-objs with <module>-y blktrace: Don't output messages if NOTIFY isn't set.
This commit is contained in:
@@ -168,7 +168,15 @@ static struct throtl_grp * throtl_find_alloc_tg(struct throtl_data *td,
|
||||
* tree of blkg (instead of traversing through hash list all
|
||||
* the time.
|
||||
*/
|
||||
tg = tg_of_blkg(blkiocg_lookup_group(blkcg, key));
|
||||
|
||||
/*
|
||||
* This is the common case when there are no blkio cgroups.
|
||||
* Avoid lookup in this case
|
||||
*/
|
||||
if (blkcg == &blkio_root_cgroup)
|
||||
tg = &td->root_tg;
|
||||
else
|
||||
tg = tg_of_blkg(blkiocg_lookup_group(blkcg, key));
|
||||
|
||||
/* Fill in device details for root group */
|
||||
if (tg && !tg->blkg.dev && bdi->dev && dev_name(bdi->dev)) {
|
||||
|
||||
+7
-3
@@ -599,7 +599,7 @@ cfq_group_slice(struct cfq_data *cfqd, struct cfq_group *cfqg)
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
cfq_scaled_group_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
|
||||
cfq_scaled_cfqq_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
|
||||
{
|
||||
unsigned slice = cfq_prio_to_slice(cfqd, cfqq);
|
||||
if (cfqd->cfq_latency) {
|
||||
@@ -631,7 +631,7 @@ cfq_scaled_group_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
|
||||
static inline void
|
||||
cfq_set_prio_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
|
||||
{
|
||||
unsigned slice = cfq_scaled_group_slice(cfqd, cfqq);
|
||||
unsigned slice = cfq_scaled_cfqq_slice(cfqd, cfqq);
|
||||
|
||||
cfqq->slice_start = jiffies;
|
||||
cfqq->slice_end = jiffies + slice;
|
||||
@@ -1671,7 +1671,7 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq,
|
||||
*/
|
||||
if (timed_out) {
|
||||
if (cfq_cfqq_slice_new(cfqq))
|
||||
cfqq->slice_resid = cfq_scaled_group_slice(cfqd, cfqq);
|
||||
cfqq->slice_resid = cfq_scaled_cfqq_slice(cfqd, cfqq);
|
||||
else
|
||||
cfqq->slice_resid = cfqq->slice_end - jiffies;
|
||||
cfq_log_cfqq(cfqd, cfqq, "resid=%ld", cfqq->slice_resid);
|
||||
@@ -3432,6 +3432,10 @@ static bool cfq_should_wait_busy(struct cfq_data *cfqd, struct cfq_queue *cfqq)
|
||||
{
|
||||
struct cfq_io_context *cic = cfqd->active_cic;
|
||||
|
||||
/* If the queue already has requests, don't wait */
|
||||
if (!RB_EMPTY_ROOT(&cfqq->sort_list))
|
||||
return false;
|
||||
|
||||
/* If there are other queues in the group, don't wait */
|
||||
if (cfqq->cfqg->nr_cfqq > 1)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user