Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167428
b: refs/heads/master
c: 48e025e
h: refs/heads/master
v: v3
  • Loading branch information
Corrado Zoccolo authored and Jens Axboe committed Oct 5, 2009
1 parent 572f8db commit a193143
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30996f40bffe73f05abb92a4cec254befa8cecf7
refs/heads/master: 48e025e63ac908ed6ec5394a294f4ecd510a7476
9 changes: 6 additions & 3 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,11 @@ static void cfq_service_tree_add(struct cfq_data *cfqd, struct cfq_queue *cfqq,
rb_key = cfq_slice_offset(cfqd, cfqq) + jiffies;
rb_key += cfqq->slice_resid;
cfqq->slice_resid = 0;
} else
rb_key = 0;
} else {
rb_key = -HZ;
__cfqq = cfq_rb_first(&cfqd->service_tree);
rb_key += __cfqq ? __cfqq->rb_key : jiffies;
}

if (!RB_EMPTY_NODE(&cfqq->rb_node)) {
/*
Expand Down Expand Up @@ -547,7 +550,7 @@ static void cfq_service_tree_add(struct cfq_data *cfqd, struct cfq_queue *cfqq,
n = &(*p)->rb_left;
else if (cfq_class_idle(cfqq) > cfq_class_idle(__cfqq))
n = &(*p)->rb_right;
else if (rb_key < __cfqq->rb_key)
else if (time_before(rb_key, __cfqq->rb_key))
n = &(*p)->rb_left;
else
n = &(*p)->rb_right;
Expand Down

0 comments on commit a193143

Please sign in to comment.