Magellan Linux

Contents of /trunk/kernel26-alx/patches-2.6.21-r14/0010-2.6.21-cfq-iso_idleprio_ionice.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 447 - (show annotations) (download)
Tue Jan 22 17:55:52 2008 UTC (16 years, 3 months ago) by niro
File size: 1884 byte(s)
-2.6.21-alx-r14 - fixed some natsemi errors on wys terminals

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. Note this means the
6 SCHED_IDLEPRIO tasks will also get idle usage of I/O by default meaning
7 no disk reads will be allowed when there is any I/O wait already occurring.
8
9 Signed-off-by: Con Kolivas <kernel@kolivas.org>
10
11 ---
12 block/cfq-iosched.c | 2 ++
13 include/linux/ioprio.h | 6 ++++++
14 2 files changed, 8 insertions(+)
15
16 Index: linux-2.6.21-ck2/include/linux/ioprio.h
17 ===================================================================
18 --- linux-2.6.21-ck2.orig/include/linux/ioprio.h 2007-05-14 19:49:54.000000000 +1000
19 +++ linux-2.6.21-ck2/include/linux/ioprio.h 2007-05-14 19:49:55.000000000 +1000
20 @@ -56,6 +56,8 @@ static inline enum ioprio_class
21 {
22 if (rt_task(task))
23 return IOPRIO_CLASS_RT;
24 + if (idleprio_task(task))
25 + return IOPRIO_CLASS_IDLE;
26 return IOPRIO_CLASS_BE;
27 }
28
29 @@ -64,6 +66,10 @@ static inline int task_nice_ioprio(struc
30 if (rt_task(task))
31 return (MAX_RT_PRIO - task->rt_priority) * IOPRIO_BE_NR /
32 (MAX_RT_PRIO + 1);
33 + if (iso_task(task))
34 + return 0;
35 + if (idleprio_task(task))
36 + return IOPRIO_BE_NR - 1;
37 return (task_nice(task) + 20) / 5;
38 }
39
40 Index: linux-2.6.21-ck2/block/cfq-iosched.c
41 ===================================================================
42 --- linux-2.6.21-ck2.orig/block/cfq-iosched.c 2007-05-14 19:49:54.000000000 +1000
43 +++ linux-2.6.21-ck2/block/cfq-iosched.c 2007-05-14 19:49:55.000000000 +1000
44 @@ -1262,6 +1262,8 @@ static void cfq_init_prio_data(struct cf
45 */
46 cfqq->ioprio_class = task_policy_ioprio_class(tsk);
47 cfqq->ioprio = task_nice_ioprio(tsk);
48 + if (cfqq->ioprio_class == IOPRIO_CLASS_IDLE)
49 + cfq_clear_cfqq_idle_window(cfqq);
50 break;
51 case IOPRIO_CLASS_RT:
52 cfqq->ioprio = task_ioprio(tsk);