Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47870
b: refs/heads/master
c: 98e41c7
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe authored and Jens Axboe committed Feb 11, 2007
1 parent 4e9b5aa commit 324ebe1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 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: aaf1228ddfb44f04c87d1e7dfc5ccffdba74363d
refs/heads/master: 98e41c7dfc90c0e9a1086502d4c4d367e1ad74db
19 changes: 9 additions & 10 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,11 @@ static void cfq_resort_rr_list(struct cfq_queue *cfqq, int preempted)
struct cfq_data *cfqd = cfqq->cfqd;
struct list_head *list;

BUG_ON(!cfq_cfqq_on_rr(cfqq));
/*
* Resorting requires the cfqq to be on the RR list already.
*/
if (!cfq_cfqq_on_rr(cfqq))
return;

list_del(&cfqq->cfq_list);

Expand Down Expand Up @@ -642,8 +646,7 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq,
else
cfqq->slice_left = 0;

if (cfq_cfqq_on_rr(cfqq))
cfq_resort_rr_list(cfqq, preempted);
cfq_resort_rr_list(cfqq, preempted);

if (cfqq == cfqd->active_queue)
cfqd->active_queue = NULL;
Expand Down Expand Up @@ -1238,9 +1241,7 @@ static void cfq_init_prio_data(struct cfq_queue *cfqq)
cfqq->org_ioprio = cfqq->ioprio;
cfqq->org_ioprio_class = cfqq->ioprio_class;

if (cfq_cfqq_on_rr(cfqq))
cfq_resort_rr_list(cfqq, 0);

cfq_resort_rr_list(cfqq, 0);
cfq_clear_cfqq_prio_changed(cfqq);
}

Expand Down Expand Up @@ -1691,8 +1692,7 @@ static void cfq_completed_request(request_queue_t *q, struct request *rq)
if (!cfq_class_idle(cfqq))
cfqd->last_end_request = now;

if (!cfq_cfqq_dispatched(cfqq) && cfq_cfqq_on_rr(cfqq))
cfq_resort_rr_list(cfqq, 0);
cfq_resort_rr_list(cfqq, 0);

if (sync)
RQ_CIC(rq)->last_end_request = now;
Expand Down Expand Up @@ -1742,8 +1742,7 @@ static void cfq_prio_boost(struct cfq_queue *cfqq)
/*
* refile between round-robin lists if we moved the priority class
*/
if ((ioprio_class != cfqq->ioprio_class || ioprio != cfqq->ioprio) &&
cfq_cfqq_on_rr(cfqq))
if ((ioprio_class != cfqq->ioprio_class || ioprio != cfqq->ioprio))
cfq_resort_rr_list(cfqq, 0);
}

Expand Down

0 comments on commit 324ebe1

Please sign in to comment.