aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-07-10 07:43:25 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-07-10 07:43:25 -0400
commit15c31be4d5bd2402c6f5a288d56a24edc9252b71 (patch)
tree0fca6e97186080d83ff3f36bb359bcb4ef06a9e2 /include/linux
parent72d3a38ee083a96c09032e608a4c7e047ce26760 (diff)
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ioprio.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
index 8e2042b9d471..2eaa142cd061 100644
--- a/include/linux/ioprio.h
+++ b/include/linux/ioprio.h
@@ -47,8 +47,10 @@ enum {
47#define IOPRIO_NORM (4) 47#define IOPRIO_NORM (4)
48static inline int task_ioprio(struct task_struct *task) 48static inline int task_ioprio(struct task_struct *task)
49{ 49{
50 WARN_ON(!ioprio_valid(task->ioprio)); 50 if (ioprio_valid(task->ioprio))
51 return IOPRIO_PRIO_DATA(task->ioprio); 51 return IOPRIO_PRIO_DATA(task->ioprio);
52
53 return IOPRIO_NORM;
52} 54}
53 55
54static inline int task_nice_ioprio(struct task_struct *task) 56static inline int task_nice_ioprio(struct task_struct *task)