Magellan Linux

Contents of /trunk/kernel26-alx/patches-2.6.20-r6/0011-2.6.20-cfq-iso_idleprio_ionice.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1175 - (show annotations) (download)
Thu Oct 14 12:15:46 2010 UTC (13 years, 6 months ago) by niro
File size: 1716 byte(s)
-2.6.20-alx-r6 new magellan 0.5.2 kernel
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-2.6.20-ck1/include/linux/ioprio.h
15 ===================================================================
16 --- linux-2.6.20-ck1.orig/include/linux/ioprio.h 2007-02-16 19:01:32.000000000 +1100
17 +++ linux-2.6.20-ck1/include/linux/ioprio.h 2007-02-16 19:01:32.000000000 +1100
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 + 1);
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-2.6.20-ck1/block/cfq-iosched.c
39 ===================================================================
40 --- linux-2.6.20-ck1.orig/block/cfq-iosched.c 2007-02-16 19:01:32.000000000 +1100
41 +++ linux-2.6.20-ck1/block/cfq-iosched.c 2007-02-16 19:01:32.000000000 +1100
42 @@ -1215,6 +1215,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);