summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Steigerwald <ms@teamix.de>2008-09-23 15:48:44 +0400
committerIngo Molnar <mingo@elte.hu>2008-09-23 15:49:44 +0400
commit1a73ef6ac3f4b44abc9d1875eb9240d7524a7cf7 (patch)
treeb00508544fc5e25daf3ae7adecfc054151efa4ab
parent006c75f146e58e080d2b2725a6664f71886e112b (diff)
downloadlinux-1a73ef6ac3f4b44abc9d1875eb9240d7524a7cf7.tar.xz
CFS scheduler: documentation about scheduling policies
The documentation about the CFS scheduler is scarse when it comes to scheduling policies. This patch adds a chapter about the scheduling policies it supports. Peter Zijlstra provided most of the information for it in http://marc.info/?l=linux-kernel&m=122210038326356&w=2 Signed-off-by: Martin Steigerwald <ms@teamix.de> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--Documentation/scheduler/sched-design-CFS.txt28
1 files changed, 26 insertions, 2 deletions
diff --git a/Documentation/scheduler/sched-design-CFS.txt b/Documentation/scheduler/sched-design-CFS.txt
index b2aa856339a7..9d8eb553884c 100644
--- a/Documentation/scheduler/sched-design-CFS.txt
+++ b/Documentation/scheduler/sched-design-CFS.txt
@@ -114,7 +114,31 @@ result.
-5. SCHEDULING CLASSES
+5. Scheduling policies
+
+CFS implements three scheduling policies:
+
+ - SCHED_NORMAL (traditionally called SCHED_OTHER): The scheduling
+ policy that is used for regular tasks.
+
+ - SCHED_BATCH: Does not preempt nearly as often as regular tasks
+ would, thereby allowing tasks to run longer and make better use of
+ caches but at the cost of interactivity. This is well suited for
+ batch jobs.
+
+ - SCHED_IDLE: This is even weaker than nice 19, but its not a true
+ idle timer scheduler in order to avoid to get into priority
+ inversion problems which would deadlock the machine.
+
+SCHED_FIFO/_RR are implemented in sched_rt.c and are as specified by
+POSIX.
+
+The command chrt from util-linux-ng 2.13.1.1 can set all of these except
+SCHED_IDLE.
+
+
+
+6. SCHEDULING CLASSES
The new CFS scheduler has been designed in such a way to introduce "Scheduling
Classes," an extensible hierarchy of scheduler modules. These modules
@@ -179,7 +203,7 @@ This is the (partial) list of the hooks:
-6. GROUP SCHEDULER EXTENSIONS TO CFS
+7. GROUP SCHEDULER EXTENSIONS TO CFS
Normally, the scheduler operates on individual tasks and strives to provide
fair CPU time to each task. Sometimes, it may be desirable to group tasks and