Messages in this thread Patch in this message | | | Date | Fri, 28 Dec 2001 10:45:50 -0800 (PST) | From | Davide Libenzi <> | Subject | [PATCH] scheduler values adjustment ... |
| |
Linus, this change some default value after having observed values distribution. dyn_prio changed to unsigned and increased mm affinity bonus.
- Davide
diff -Nru linux-2.5.2-pre3.vanilla/include/linux/sched.h linux-2.5.2-pre3.psch/include/linux/sched.h --- linux-2.5.2-pre3.vanilla/include/linux/sched.h Thu Dec 27 20:11:25 2001 +++ linux-2.5.2-pre3.psch/include/linux/sched.h Fri Dec 28 10:37:17 2001 @@ -302,7 +302,7 @@ * all fields in a single cacheline that are needed for * the goodness() loop in schedule(). */ - long dyn_prio; + unsigned long dyn_prio; long nice; unsigned long policy; struct mm_struct *mm; @@ -452,7 +452,7 @@ */ #define _STK_LIM (8*1024*1024)
-#define MAX_DYNPRIO 100 +#define MAX_DYNPRIO 40 #define DEF_TSLICE (6 * HZ / 100) #define MAX_TSLICE (20 * HZ / 100) #define DEF_NICE (0) diff -Nru linux-2.5.2-pre3.vanilla/kernel/sched.c linux-2.5.2-pre3.psch/kernel/sched.c --- linux-2.5.2-pre3.vanilla/kernel/sched.c Thu Dec 27 20:11:25 2001 +++ linux-2.5.2-pre3.psch/kernel/sched.c Fri Dec 28 09:29:36 2001 @@ -70,6 +70,7 @@
#define NICE_TO_TICKS(nice) (TICK_SCALE(20-(nice))+1)
+#define MM_AFFINITY_BONUS 4
/* * Init task must be ok at boot for the ix86 as we will check its signals @@ -181,7 +182,7 @@
/* .. and a slight advantage to the current MM */ if (p->mm == this_mm || !p->mm) - weight += 1; + weight += MM_AFFINITY_BONUS; weight += 20 - p->nice; goto out; } @@ -533,7 +534,7 @@ p->need_resched = 1; else { if (!--p->time_slice) { - if (p->dyn_prio > 0) { + if (p->dyn_prio) { --p->time_slice; --p->dyn_prio; }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |