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 /kernel/exit.c | |
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 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index f8e609ff1893..7fb541cb8d69 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -244,7 +244,9 @@ static inline void reparent_to_init(void) | |||
244 | /* Set the exit signal to SIGCHLD so we signal init on exit */ | 244 | /* Set the exit signal to SIGCHLD so we signal init on exit */ |
245 | current->exit_signal = SIGCHLD; | 245 | current->exit_signal = SIGCHLD; |
246 | 246 | ||
247 | if ((current->policy == SCHED_NORMAL) && (task_nice(current) < 0)) | 247 | if ((current->policy == SCHED_NORMAL || |
248 | current->policy == SCHED_BATCH) | ||
249 | && (task_nice(current) < 0)) | ||
248 | set_user_nice(current, 0); | 250 | set_user_nice(current, 0); |
249 | /* cpus_allowed? */ | 251 | /* cpus_allowed? */ |
250 | /* rt_priority? */ | 252 | /* rt_priority? */ |