Skip to content

Commit

Permalink
[PATCH] cfq-iosched: don't use a hard jiffies value, translate from m…
Browse files Browse the repository at this point in the history
…secs

The CIC_SEEKY() test really wants to use the minimum of either:

- 2 msecs (not jiffies)

- or, the pending slice time

So code it like that.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Jens Axboe committed Jul 25, 2006
1 parent ad01b1c commit 44eb123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ static int cfq_arm_slice_timer(struct cfq_data *cfqd, struct cfq_queue *cfqq)
* seeks. so allow a little bit of time for him to submit a new rq
*/
if (sample_valid(cic->seek_samples) && CIC_SEEKY(cic))
sl = 2;
sl = min(sl, msecs_to_jiffies(2));

mod_timer(&cfqd->idle_slice_timer, jiffies + sl);
return 1;
Expand Down

0 comments on commit 44eb123

Please sign in to comment.