Magellan Linux

Contents of /trunk/kernel26-magellan/patches-2.6.16-r12/0030-2.6.16-sched-s15_test2.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 72 - (show annotations) (download)
Mon Jun 5 09:25:38 2006 UTC (17 years, 10 months ago) by niro
File size: 2149 byte(s)
ver bump to 2.6.16-r12:
- updated to linux-2.6.16.19
- updated to ck11

1 include/linux/sched.h | 1 +
2 kernel/sched.c | 9 ++++++---
3 2 files changed, 7 insertions(+), 3 deletions(-)
4
5 Index: linux-2.6.16-ck6/include/linux/sched.h
6 ===================================================================
7 --- linux-2.6.16-ck6.orig/include/linux/sched.h 2006-04-18 09:28:52.000000000 +1000
8 +++ linux-2.6.16-ck6/include/linux/sched.h 2006-04-18 09:32:45.000000000 +1000
9 @@ -961,6 +961,7 @@ static inline void put_task_struct(struc
10 #define PF_SWAPWRITE 0x01000000 /* Allowed to write to swap */
11 #define PF_NONSLEEP 0x02000000 /* Waiting on in kernel activity */
12 #define PF_ISOREF 0x04000000 /* SCHED_ISO task has used up quota */
13 +#define PF_FORKED 0x08000000 /* Task just forked another process */
14
15 /*
16 * Only the _current_ task can read/write to tsk->flags, but other
17 Index: linux-2.6.16-ck6/kernel/sched.c
18 ===================================================================
19 --- linux-2.6.16-ck6.orig/kernel/sched.c 2006-04-18 09:30:10.000000000 +1000
20 +++ linux-2.6.16-ck6/kernel/sched.c 2006-04-18 09:32:45.000000000 +1000
21 @@ -18,7 +18,7 @@
22 * 2004-04-02 Scheduler domains code by Nick Piggin
23 * 2006-04-02 Staircase scheduling policy by Con Kolivas with help
24 * from William Lee Irwin III, Zwane Mwaikambo & Peter Williams.
25 - * Staircase v15
26 + * Staircase v15_test2
27 */
28
29 #include <linux/mm.h>
30 @@ -808,6 +808,9 @@ static inline void recalc_task_prio(task
31 else
32 sleep_time = 0;
33
34 + if (unlikely(p->flags & PF_FORKED))
35 + sleep_time = 0;
36 +
37 /*
38 * If we sleep longer than our running total and have not set the
39 * PF_NONSLEEP flag we gain a bonus.
40 @@ -846,7 +849,7 @@ static void activate_task(task_t *p, run
41 p->time_slice = p->slice % rr ? : rr;
42 if (!rt_task(p)) {
43 recalc_task_prio(p, now);
44 - p->flags &= ~PF_NONSLEEP;
45 + p->flags &= ~(PF_NONSLEEP | PF_FORKED);
46 p->systime = 0;
47 p->prio = effective_prio(p);
48 }
49 @@ -1463,7 +1466,7 @@ void fastcall wake_up_new_task(task_t *p
50
51 /* Forked process gets no bonus to prevent fork bombs. */
52 p->bonus = 0;
53 - current->flags |= PF_NONSLEEP;
54 + current->flags |= PF_FORKED;
55
56 if (likely(cpu == this_cpu)) {
57 activate_task(p, rq, 1);