cfq-iosched: fix async queue behaviour

With the cfq_queue hash removal, we inadvertently got rid of the
async queue sharing. This was not intentional, in fact CFQ purposely
shares the async queue per priority level to get good merging for
async writes.

So put some logic in cfq_get_queue() to track the shared queues.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
Jens Axboe
2007-07-10 13:43:25 +02:00
parent 72d3a38ee0
commit 15c31be4d5
2 changed files with 40 additions and 5 deletions

View File

@@ -47,8 +47,10 @@ enum {
#define IOPRIO_NORM (4)
static inline int task_ioprio(struct task_struct *task)
{
WARN_ON(!ioprio_valid(task->ioprio));
return IOPRIO_PRIO_DATA(task->ioprio);
if (ioprio_valid(task->ioprio))
return IOPRIO_PRIO_DATA(task->ioprio);
return IOPRIO_NORM;
}
static inline int task_nice_ioprio(struct task_struct *task)