cfq: async queue allocation per priority
If we have two processes with different ioprio_class, but the same ioprio_data, their async requests will fall into the same queue. I guess such behavior is not expected, because it's not right to put real-time requests and best-effort requests in the same queue. The attached patch fixes the problem by introducing additional *cfqq fields on cfqd, pointing to per-(class,priority) async queues. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:

committed by
Jens Axboe

parent
9a79b22741
commit
c2dea2d1fd
@@ -53,6 +53,14 @@ static inline int task_ioprio(struct task_struct *task)
|
||||
return IOPRIO_NORM;
|
||||
}
|
||||
|
||||
static inline int task_ioprio_class(struct task_struct *task)
|
||||
{
|
||||
if (ioprio_valid(task->ioprio))
|
||||
return IOPRIO_PRIO_CLASS(task->ioprio);
|
||||
|
||||
return IOPRIO_CLASS_BE;
|
||||
}
|
||||
|
||||
static inline int task_nice_ioprio(struct task_struct *task)
|
||||
{
|
||||
return (task_nice(task) + 20) / 5;
|
||||
|
Reference in New Issue
Block a user