Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172915
b: refs/heads/master
c: 1a1238a
h: refs/heads/master
i:
  172913: 858a68f
  172911: e07f0fd
v: v3
  • Loading branch information
Shaohua Li authored and Jens Axboe committed Oct 27, 2009
1 parent 91a2214 commit 7c153bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6c5bc737ab71e4af6025ef7d150f5a26ae5f146
refs/heads/master: 1a1238a7dd48e48b3bba8f426a1d61c22c80d6d1
12 changes: 12 additions & 0 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2257,13 +2257,25 @@ static void cfq_insert_request(struct request_queue *q, struct request *rq)
*/
static void cfq_update_hw_tag(struct cfq_data *cfqd)
{
struct cfq_queue *cfqq = cfqd->active_queue;

if (rq_in_driver(cfqd) > cfqd->rq_in_driver_peak)
cfqd->rq_in_driver_peak = rq_in_driver(cfqd);

if (cfqd->rq_queued <= CFQ_HW_QUEUE_MIN &&
rq_in_driver(cfqd) <= CFQ_HW_QUEUE_MIN)
return;

/*
* If active queue hasn't enough requests and can idle, cfq might not
* dispatch sufficient requests to hardware. Don't zero hw_tag in this
* case
*/
if (cfqq && cfq_cfqq_idle_window(cfqq) &&
cfqq->dispatched + cfqq->queued[0] + cfqq->queued[1] <
CFQ_HW_QUEUE_MIN && rq_in_driver(cfqd) < CFQ_HW_QUEUE_MIN)
return;

if (cfqd->hw_tag_samples++ < 50)
return;

Expand Down

0 comments on commit 7c153bf

Please sign in to comment.