Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167436
b: refs/heads/master
c: 355b659
h: refs/heads/master
v: v3
  • Loading branch information
Corrado Zoccolo authored and Jens Axboe committed Oct 8, 2009
1 parent 5272dc8 commit 4681e2c
Show file tree
Hide file tree
Showing 2 changed files with 10 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: a6151c3a5c8e1ff5a28450bc8d6a99a2a0add0a7
refs/heads/master: 355b659c87432a4e76160640625c47fcf9174e8d
9 changes: 9 additions & 0 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,15 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
if (!cic || !atomic_read(&cic->ioc->nr_tasks))
return;

/*
* If our average think time is larger than the remaining time
* slice, then don't idle. This avoids overrunning the allotted
* time slice.
*/
if (sample_valid(cic->ttime_samples) &&
(cfqq->slice_end - jiffies < cic->ttime_mean))
return;

cfq_mark_cfqq_wait_request(cfqq);

/*
Expand Down

0 comments on commit 4681e2c

Please sign in to comment.