Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230595
b: refs/heads/master
c: e4ea0c1
h: refs/heads/master
i:
  230593: d40d65c
  230591: da825cf
v: v3
  • Loading branch information
Shaohua Li writes authored and Jens Axboe committed Dec 13, 2010
1 parent fd904eb commit 406aef5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 760701bfe14faee8ea0608a9cab2046071d98a39
refs/heads/master: e4ea0c16a85d221ebcc3a21f32e321440459e0fc
5 changes: 5 additions & 0 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2101,6 +2101,7 @@ static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg)
unsigned count;
struct cfq_rb_root *st;
unsigned group_slice;
enum wl_prio_t original_prio = cfqd->serving_prio;

if (!cfqg) {
cfqd->serving_prio = IDLE_WORKLOAD;
Expand All @@ -2119,6 +2120,9 @@ static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg)
return;
}

if (original_prio != cfqd->serving_prio)
goto new_workload;

/*
* For RT and BE, we have to choose also the type
* (SYNC, SYNC_NOIDLE, ASYNC), and to compute a workload
Expand All @@ -2133,6 +2137,7 @@ static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg)
if (count && !time_after(jiffies, cfqd->workload_expires))
return;

new_workload:
/* otherwise select new workload type */
cfqd->serving_type =
cfq_choose_wl(cfqd, cfqg, cfqd->serving_prio);
Expand Down

0 comments on commit 406aef5

Please sign in to comment.