Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37559
b: refs/heads/master
c: bf57225
h: refs/heads/master
i:
  37557: 00fd4e3
  37555: 03e7859
  37551: 9f03c4f
v: v3
  • Loading branch information
Jens Axboe authored and Jens Axboe committed Sep 30, 2006
1 parent 115d958 commit 191802b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: dc72ef4ae35c2016fb594bcc85ce871376682174
refs/heads/master: bf57225670bcbeb357182d800736b4782cde7295
14 changes: 8 additions & 6 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,17 +1539,19 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
*/
static void cfq_preempt_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq)
{
struct cfq_queue *__cfqq, *next;

list_for_each_entry_safe(__cfqq, next, &cfqd->cur_rr, cfq_list)
cfq_resort_rr_list(__cfqq, 1);
cfq_slice_expired(cfqd, 1);

if (!cfqq->slice_left)
cfqq->slice_left = cfq_prio_to_slice(cfqd, cfqq) / 2;

/*
* Put the new queue at the front of the of the current list,
* so we know that it will be selected next.
*/
BUG_ON(!cfq_cfqq_on_rr(cfqq));
list_move(&cfqq->cfq_list, &cfqd->cur_rr);

cfqq->slice_end = cfqq->slice_left + jiffies;
cfq_slice_expired(cfqd, 1);
__cfq_set_active_queue(cfqd, cfqq);
}

/*
Expand Down

0 comments on commit 191802b

Please sign in to comment.