Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172932
b: refs/heads/master
c: e00ef79
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Nov 4, 2009
1 parent 7503bd5 commit b0dcfd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 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: 125c4f221a5352ae08aef2898055b879ad963f01
refs/heads/master: e00ef7997195e4f8e10593727a6286e2e2802159
21 changes: 2 additions & 19 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ enum cfqq_state_flags {
CFQ_CFQQ_FLAG_slice_new, /* no requests dispatched in slice */
CFQ_CFQQ_FLAG_sync, /* synchronous queue */
CFQ_CFQQ_FLAG_coop, /* cfqq is shared */
CFQ_CFQQ_FLAG_coop_preempt, /* coop preempt */
};

#define CFQ_CFQQ_FNS(name) \
Expand All @@ -280,7 +279,6 @@ CFQ_CFQQ_FNS(prio_changed);
CFQ_CFQQ_FNS(slice_new);
CFQ_CFQQ_FNS(sync);
CFQ_CFQQ_FNS(coop);
CFQ_CFQQ_FNS(coop_preempt);
#undef CFQ_CFQQ_FNS

#define cfq_log_cfqq(cfqd, cfqq, fmt, args...) \
Expand Down Expand Up @@ -1070,16 +1068,9 @@ static struct cfq_queue *cfq_get_next_queue(struct cfq_data *cfqd)
static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd,
struct cfq_queue *cfqq)
{
if (!cfqq) {
if (!cfqq)
cfqq = cfq_get_next_queue(cfqd);

if (cfqq && !cfq_cfqq_coop_preempt(cfqq))
cfq_clear_cfqq_coop(cfqq);
}

if (cfqq)
cfq_clear_cfqq_coop_preempt(cfqq);

__cfq_set_active_queue(cfqd, cfqq);
return cfqq;
}
Expand Down Expand Up @@ -2433,16 +2424,8 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
* if this request is as-good as one we would expect from the
* current cfqq, let it preempt
*/
if (cfq_rq_close(cfqd, cfqq, rq) && (!cfq_cfqq_coop(new_cfqq) ||
cfqd->busy_queues == 1)) {
/*
* Mark new queue coop_preempt, so its coop flag will not be
* cleared when new queue gets scheduled at the very first time
*/
cfq_mark_cfqq_coop_preempt(new_cfqq);
cfq_mark_cfqq_coop(new_cfqq);
if (cfq_rq_close(cfqd, cfqq, rq))
return true;
}

return false;
}
Expand Down

0 comments on commit b0dcfd9

Please sign in to comment.