Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172963
b: refs/heads/master
c: 3586e91
h: refs/heads/master
i:
  172961: a73d15e
  172959: 6685012
v: v3
  • Loading branch information
Gui Jianfeng authored and Jens Axboe committed Nov 26, 2009
1 parent d0af9ed commit 5406b42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 32a87c0114f37871aefb12a30de3e0c3300e3646
refs/heads/master: 3586e917f2c7df769d173c4ec99554cb40a911e5
8 changes: 6 additions & 2 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,11 +600,15 @@ cfq_find_next_rq(struct cfq_data *cfqd, struct cfq_queue *cfqq,
static unsigned long cfq_slice_offset(struct cfq_data *cfqd,
struct cfq_queue *cfqq)
{
struct cfq_rb_root *service_tree;

service_tree = service_tree_for(cfqq_prio(cfqq), cfqq_type(cfqq), cfqd);

/*
* just an approximation, should be ok.
*/
return (cfqd->busy_queues - 1) * (cfq_prio_slice(cfqd, 1, 0) -
cfq_prio_slice(cfqd, cfq_cfqq_sync(cfqq), cfqq->ioprio));
return service_tree->count * (cfq_prio_slice(cfqd, 1, 0) -
cfq_prio_slice(cfqd, cfq_cfqq_sync(cfqq), cfqq->ioprio));
}

/*
Expand Down

0 comments on commit 5406b42

Please sign in to comment.