Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27074
b: refs/heads/master
c: 25776e3
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Jun 1, 2006
1 parent cd338fe commit 799c73c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12e9fddd6eb827937fcaac8ac7712c7303898b1f
refs/heads/master: 25776e3594f841b7fae7b33ebecf009a0a55bed1
15 changes: 13 additions & 2 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ struct cfq_data {
mempool_t *crq_pool;

int rq_in_driver;
int hw_tag;

/*
* schedule slice state info
Expand Down Expand Up @@ -664,6 +665,15 @@ static void cfq_activate_request(request_queue_t *q, struct request *rq)
struct cfq_data *cfqd = q->elevator->elevator_data;

cfqd->rq_in_driver++;

/*
* If the depth is larger 1, it really could be queueing. But lets
* make the mark a little higher - idling could still be good for
* low queueing, and a low queueing number could also just indicate
* a SCSI mid layer like behaviour where limit+1 is often seen.
*/
if (!cfqd->hw_tag && cfqd->rq_in_driver > 4)
cfqd->hw_tag = 1;
}

static void cfq_deactivate_request(request_queue_t *q, struct request *rq)
Expand Down Expand Up @@ -1465,7 +1475,8 @@ cfq_get_queue(struct cfq_data *cfqd, unsigned int key, struct task_struct *tsk,
* set ->slice_left to allow preemption for a new process
*/
cfqq->slice_left = 2 * cfqd->cfq_slice_idle;
cfq_mark_cfqq_idle_window(cfqq);
if (!cfqd->hw_tag)
cfq_mark_cfqq_idle_window(cfqq);
cfq_mark_cfqq_prio_changed(cfqq);
cfq_init_prio_data(cfqq);
}
Expand Down Expand Up @@ -1656,7 +1667,7 @@ cfq_update_idle_window(struct cfq_data *cfqd, struct cfq_queue *cfqq,
{
int enable_idle = cfq_cfqq_idle_window(cfqq);

if (!cic->ioc->task || !cfqd->cfq_slice_idle)
if (!cic->ioc->task || !cfqd->cfq_slice_idle || cfqd->hw_tag)
enable_idle = 0;
else if (sample_valid(cic->ttime_samples)) {
if (cic->ttime_mean > cfqd->cfq_slice_idle)
Expand Down

0 comments on commit 799c73c

Please sign in to comment.