diff options
author | Corrado Zoccolo <czoccolo@gmail.com> | 2009-10-07 13:51:54 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-10-07 13:51:54 -0400 |
commit | ec60e4f6749daf535329dac571293cf19c627aff (patch) | |
tree | 791e2a15281bf0a3b114af6f6c9c5b2d2b0dc982 /block | |
parent | b9c8946b192397394a0ccd4fcecb31bc060f79f8 (diff) |
cfq-iosched: fix think time allowed for seekers
CFQ enables idle only for processes that think less than the allowed
idle time. Since idle time is lower for seeky queues, we should use the
correct value in the comparison.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/cfq-iosched.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 4ab33d8a20b2..b35cc56dfd94 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1995,7 +1995,10 @@ cfq_update_idle_window(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
1995 | (!cfqd->cfq_latency && cfqd->hw_tag && CIC_SEEKY(cic))) | 1995 | (!cfqd->cfq_latency && cfqd->hw_tag && CIC_SEEKY(cic))) |
1996 | enable_idle = 0; | 1996 | enable_idle = 0; |
1997 | else if (sample_valid(cic->ttime_samples)) { | 1997 | else if (sample_valid(cic->ttime_samples)) { |
1998 | if (cic->ttime_mean > cfqd->cfq_slice_idle) | 1998 | unsigned int slice_idle = cfqd->cfq_slice_idle; |
1999 | if (sample_valid(cic->seek_samples) && CIC_SEEKY(cic)) | ||
2000 | slice_idle = msecs_to_jiffies(CFQ_MIN_TT); | ||
2001 | if (cic->ttime_mean > slice_idle) | ||
1999 | enable_idle = 0; | 2002 | enable_idle = 0; |
2000 | else | 2003 | else |
2001 | enable_idle = 1; | 2004 | enable_idle = 1; |