Contents of /trunk/kernel26-magellan/patches-2.6.17-r6/0013-2.6.17-cfq-iso_idleprio_ionice.patch
Parent Directory | Revision Log
Revision 105 -
(show annotations)
(download)
Sun Mar 11 16:17:56 2007 UTC (17 years, 6 months ago) by niro
File size: 1686 byte(s)
Sun Mar 11 16:17:56 2007 UTC (17 years, 6 months ago) by niro
File size: 1686 byte(s)
2.6.17-magellan-r6
1 | For SCHED_ISO and SCHED_IDLEPRIO tasks where no ioprio is explicitly set: |
2 | |
3 | Set ioprio to best priority normal class for SCHED_ISO tasks. |
4 | |
5 | Set ioprio to idle class for SCHED_IDLEPRIO tasks. |
6 | |
7 | Signed-off-by: Con Kolivas <kernel@kolivas.org> |
8 | |
9 | --- |
10 | block/cfq-iosched.c | 2 ++ |
11 | include/linux/ioprio.h | 6 ++++++ |
12 | 2 files changed, 8 insertions(+) |
13 | |
14 | Index: linux-ck-dev/include/linux/ioprio.h |
15 | =================================================================== |
16 | --- linux-ck-dev.orig/include/linux/ioprio.h 2006-06-18 15:23:53.000000000 +1000 |
17 | +++ linux-ck-dev/include/linux/ioprio.h 2006-06-18 15:23:56.000000000 +1000 |
18 | @@ -56,6 +56,8 @@ static inline enum ioprio_class |
19 | { |
20 | if (rt_task(task)) |
21 | return IOPRIO_CLASS_RT; |
22 | + if (idleprio_task(task)) |
23 | + return IOPRIO_CLASS_IDLE; |
24 | return IOPRIO_CLASS_BE; |
25 | } |
26 | |
27 | @@ -64,6 +66,10 @@ static inline int task_nice_ioprio(struc |
28 | if (rt_task(task)) |
29 | return (MAX_RT_PRIO - task->rt_priority) * IOPRIO_BE_NR / |
30 | MAX_RT_PRIO; |
31 | + if (iso_task(task)) |
32 | + return 0; |
33 | + if (idleprio_task(task)) |
34 | + return IOPRIO_BE_NR - 1; |
35 | return (task_nice(task) + 20) / 5; |
36 | } |
37 | |
38 | Index: linux-ck-dev/block/cfq-iosched.c |
39 | =================================================================== |
40 | --- linux-ck-dev.orig/block/cfq-iosched.c 2006-06-18 15:23:53.000000000 +1000 |
41 | +++ linux-ck-dev/block/cfq-iosched.c 2006-06-18 15:23:56.000000000 +1000 |
42 | @@ -1358,6 +1358,8 @@ static void cfq_init_prio_data(struct cf |
43 | */ |
44 | cfqq->ioprio_class = task_policy_ioprio_class(tsk); |
45 | cfqq->ioprio = task_nice_ioprio(tsk); |
46 | + if (cfqq->ioprio_class == IOPRIO_CLASS_IDLE) |
47 | + cfq_clear_cfqq_idle_window(cfqq); |
48 | break; |
49 | case IOPRIO_CLASS_RT: |
50 | cfqq->ioprio = task_ioprio(tsk); |