Skip to content

Commit

Permalink
cfq: fix IOPRIO_CLASS_IDLE accounting
Browse files Browse the repository at this point in the history
Spotted by Nick <gentuu@gmail.com>, hopefully can explain the second trace in
http://bugzilla.kernel.org/show_bug.cgi?id=9180.

If ->async_idle_cfqq != NULL cfq_put_async_queues() puts it IOPRIO_BE_NR times
in a loop. Fix this.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Oleg Nesterov authored and Jens Axboe committed Nov 7, 2007
1 parent dbeeb81 commit 2389d1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2068,9 +2068,10 @@ static void cfq_put_async_queues(struct cfq_data *cfqd)
cfq_put_queue(cfqd->async_cfqq[0][i]);
if (cfqd->async_cfqq[1][i])
cfq_put_queue(cfqd->async_cfqq[1][i]);
if (cfqd->async_idle_cfqq)
cfq_put_queue(cfqd->async_idle_cfqq);
}

if (cfqd->async_idle_cfqq)
cfq_put_queue(cfqd->async_idle_cfqq);
}

static void cfq_exit_queue(elevator_t *e)
Expand Down

0 comments on commit 2389d1e

Please sign in to comment.