diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-14 16:20:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-14 21:25:20 -0500 |
commit | b0a9499c3dd50d333e2aedb7e894873c58da3785 (patch) | |
tree | 1b9610020884091984ce8290c70bebdc3e7bb09b /include/linux/sched.h | |
parent | 2d0cfb527944c2cfee2cffab14f52d483e329fcf (diff) |
[PATCH] sched: add new SCHED_BATCH policy
Add a new SCHED_BATCH (3) scheduling policy: such tasks are presumed
CPU-intensive, and will acquire a constant +5 priority level penalty. Such
policy is nice for workloads that are non-interactive, but which do not
want to give up their nice levels. The policy is also useful for workloads
that want a deterministic scheduling policy without interactivity causing
extra preemptions (between that workload's tasks).
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index a72e17135421..2df1a1a2fee5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -160,6 +160,7 @@ extern unsigned long nr_iowait(void); | |||
160 | #define SCHED_NORMAL 0 | 160 | #define SCHED_NORMAL 0 |
161 | #define SCHED_FIFO 1 | 161 | #define SCHED_FIFO 1 |
162 | #define SCHED_RR 2 | 162 | #define SCHED_RR 2 |
163 | #define SCHED_BATCH 3 | ||
163 | 164 | ||
164 | struct sched_param { | 165 | struct sched_param { |
165 | int sched_priority; | 166 | int sched_priority; |
@@ -470,9 +471,9 @@ struct signal_struct { | |||
470 | 471 | ||
471 | /* | 472 | /* |
472 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | 473 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT |
473 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL tasks are | 474 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH |
474 | * in the range MAX_RT_PRIO..MAX_PRIO-1. Priority values | 475 | * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority |
475 | * are inverted: lower p->prio value means higher priority. | 476 | * values are inverted: lower p->prio value means higher priority. |
476 | * | 477 | * |
477 | * The MAX_USER_RT_PRIO value allows the actual maximum | 478 | * The MAX_USER_RT_PRIO value allows the actual maximum |
478 | * RT priority to be separate from the value exported to | 479 | * RT priority to be separate from the value exported to |