Skip to content

Commit

Permalink
cfq: rename a function to give it more appropriate name
Browse files Browse the repository at this point in the history
o Rename a function to give it more approprate name. We are calculating
  cfq queue slice and function name gives the impression as if cfq group
  slice length is being calculated.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
rhvgoyal authored and Jens Axboe committed Jan 19, 2011
1 parent 68264e9 commit ba5bd52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ cfq_group_slice(struct cfq_data *cfqd, struct cfq_group *cfqg)
}

static inline unsigned
cfq_scaled_group_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
cfq_scaled_cfqq_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
{
unsigned slice = cfq_prio_to_slice(cfqd, cfqq);
if (cfqd->cfq_latency) {
Expand Down Expand Up @@ -631,7 +631,7 @@ cfq_scaled_group_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
static inline void
cfq_set_prio_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
{
unsigned slice = cfq_scaled_group_slice(cfqd, cfqq);
unsigned slice = cfq_scaled_cfqq_slice(cfqd, cfqq);

cfqq->slice_start = jiffies;
cfqq->slice_end = jiffies + slice;
Expand Down Expand Up @@ -1671,7 +1671,7 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq,
*/
if (timed_out) {
if (cfq_cfqq_slice_new(cfqq))
cfqq->slice_resid = cfq_scaled_group_slice(cfqd, cfqq);
cfqq->slice_resid = cfq_scaled_cfqq_slice(cfqd, cfqq);
else
cfqq->slice_resid = cfqq->slice_end - jiffies;
cfq_log_cfqq(cfqd, cfqq, "resid=%ld", cfqq->slice_resid);
Expand Down

0 comments on commit ba5bd52

Please sign in to comment.