Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242302
b: refs/heads/master
c: 62a37f6
h: refs/heads/master
v: v3
  • Loading branch information
Justin TerAvest authored and Jens Axboe committed Mar 23, 2011
1 parent b20b789 commit 2223bde
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 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: 04521db04e9a11e74b0252d222051cb194487f4d
refs/heads/master: 62a37f6badd1ac97ba07d543b5d4be2f9cb17217
39 changes: 17 additions & 22 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1620,33 +1620,27 @@ static inline void cfq_del_timer(struct cfq_data *cfqd, struct cfq_queue *cfqq)
cfq_blkiocg_update_idle_time_stats(&cfqq->cfqg->blkg);
}

static void cfq_clear_queue_stats(struct cfq_data *cfqd,
struct cfq_queue *cfqq)
{
cfq_blkiocg_update_avg_queue_size_stats(&cfqq->cfqg->blkg);
cfqq->slice_start = 0;
cfqq->dispatch_start = jiffies;
cfqq->allocated_slice = 0;
cfqq->slice_end = 0;
cfqq->slice_dispatch = 0;
cfqq->nr_sectors = 0;

cfq_clear_cfqq_wait_request(cfqq);
cfq_clear_cfqq_must_dispatch(cfqq);
cfq_clear_cfqq_must_alloc_slice(cfqq);
cfq_clear_cfqq_fifo_expire(cfqq);
cfq_mark_cfqq_slice_new(cfqq);

cfq_del_timer(cfqd, cfqq);
}

static void __cfq_set_active_queue(struct cfq_data *cfqd,
struct cfq_queue *cfqq)
{
if (cfqq) {
cfq_log_cfqq(cfqd, cfqq, "set_active wl_prio:%d wl_type:%d",
cfqd->serving_prio, cfqd->serving_type);
cfq_clear_queue_stats(cfqd, cfqq);
cfq_blkiocg_update_avg_queue_size_stats(&cfqq->cfqg->blkg);
cfqq->slice_start = 0;
cfqq->dispatch_start = jiffies;
cfqq->allocated_slice = 0;
cfqq->slice_end = 0;
cfqq->slice_dispatch = 0;
cfqq->nr_sectors = 0;

cfq_clear_cfqq_wait_request(cfqq);
cfq_clear_cfqq_must_dispatch(cfqq);
cfq_clear_cfqq_must_alloc_slice(cfqq);
cfq_clear_cfqq_fifo_expire(cfqq);
cfq_mark_cfqq_slice_new(cfqq);

cfq_del_timer(cfqd, cfqq);
}

cfqd->active_queue = cfqq;
Expand Down Expand Up @@ -3339,7 +3333,8 @@ static void cfq_preempt_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq)

cfq_service_tree_add(cfqd, cfqq, 1);

cfq_clear_queue_stats(cfqd, cfqq);
cfqq->slice_end = 0;
cfq_mark_cfqq_slice_new(cfqq);
}

/*
Expand Down

0 comments on commit 2223bde

Please sign in to comment.