diff options
-rw-r--r-- | block/cfq-iosched.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 5c3cee93329a..4ab33d8a20b2 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -507,8 +507,14 @@ static void cfq_service_tree_add(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
507 | } else | 507 | } else |
508 | rb_key += jiffies; | 508 | rb_key += jiffies; |
509 | } else if (!add_front) { | 509 | } else if (!add_front) { |
510 | /* | ||
511 | * Get our rb key offset. Subtract any residual slice | ||
512 | * value carried from last service. A negative resid | ||
513 | * count indicates slice overrun, and this should position | ||
514 | * the next service time further away in the tree. | ||
515 | */ | ||
510 | rb_key = cfq_slice_offset(cfqd, cfqq) + jiffies; | 516 | rb_key = cfq_slice_offset(cfqd, cfqq) + jiffies; |
511 | rb_key += cfqq->slice_resid; | 517 | rb_key -= cfqq->slice_resid; |
512 | cfqq->slice_resid = 0; | 518 | cfqq->slice_resid = 0; |
513 | } else { | 519 | } else { |
514 | rb_key = -HZ; | 520 | rb_key = -HZ; |