Magellan Linux

Annotation of /trunk/kernel26-magellan/patches-2.6.21-r1/0010-2.6.21-cfq-iso_idleprio_ionice.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 196 - (hide annotations) (download)
Thu May 17 23:20:52 2007 UTC (17 years, 1 month ago) by niro
File size: 1884 byte(s)
-ver bump to 2.6.21-r1 using:
-linux-2.6.21.1
-2.6.21-ck2 patchset
-fbsplash-0.9.2-r5
-vesafb-tng-1.0-rc2
-squashfs-3.2-r2
-unionfs-2.0-u2
-suspend2-2.2.9.17
-linux-phc-0.2.10
-acpi-dsdt-0.8.4
-fuse-2.6.5
-reiser4-mm
-nvidia-drivers-1.0.9755
-ati-drivers-8.36.5
-ipw3945-1.2.1
- added a fix for sis900 oops on linux-2.6.21

1 niro 196 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);