06/02/23 14:09:30 ORgvzJHl
URLリンク(kernel.jakem.net)
から遺伝的アルゴリズムの部分を削除してみた、これはこれで音飛びしないし悪くないかも。x86の2.6.15でしかテストしてない。自己責任。
Index: 2.6/include/linux/sched.h
===================================================================
--- 2.6.org/include/linux/sched.h2005-08-15 16:16:26.000000000 -0500
+++ 2.6/include/linux/sched.h2005-08-15 16:18:21.000000000 -0500
@@ -143,6 +143,20 @@
#include <linux/spinlock.h>
/*
+ * These are the 'tuning knobs' of the scheduler:
+ *
+ * Default configurable timeslice is 100 msecs, maximum configurable
+ * timeslice is 1000 msecs and minumum configurable timeslice is 1 jiffy.
+ * Timeslices get renewed on task creation, on wake up and after they expire.
+ */
+#define MIN_TIMESLICE1
+#define DEF_TIMESLICE(10 * HZ / 1000)
+#define MAX_TIMESLICE(1000 * HZ / 1000)
+#define DEF_DESKTOP_TIMESLICE ((DEF_TIMESLICE > 10) ? (DEF_TIMESLICE / 10) : 1)
+
+#define DEFAULT_UNPRIV_RT_THRESHOLD 10
+
+/*
* This serializes "schedule()" and also protects
* the run-queue from deletions/modifications (but
* _adding_ to the beginning of the run-queue has