diff options
author | Matt Mackall | 2005-05-01 17:59:00 +0200 |
---|---|---|
committer | Linus Torvalds | 2005-05-01 17:59:00 +0200 |
commit | e43379f10b42194b8a6e1de342cfb44463c0f6da (patch) | |
tree | bf6463200dc7e14f266b7f12807c7cbfbb6700c2 /include/linux/sched.h | |
parent | [PATCH] s390: cio documentation (diff) | |
download | kernel-qcow2-linux-e43379f10b42194b8a6e1de342cfb44463c0f6da.tar.gz kernel-qcow2-linux-e43379f10b42194b8a6e1de342cfb44463c0f6da.tar.xz kernel-qcow2-linux-e43379f10b42194b8a6e1de342cfb44463c0f6da.zip |
[PATCH] nice and rt-prio rlimits
Add a pair of rlimits for allowing non-root tasks to raise nice and rt
priorities. Defaults to traditional behavior. Originally written by
Chris Wright.
The patch implements a simple rlimit ceiling for the RT (and nice) priorities
a task can set. The rlimit defaults to 0, meaning no change in behavior by
default. A value of 50 means RT priority levels 1-50 are allowed. A value of
100 means all 99 privilege levels from 1 to 99 are allowed. CAP_SYS_NICE is
blanket permission.
(akpm: see http://www.uwsg.iu.edu/hypermail/linux/kernel/0503.1/1921.html for
tips on integrating this with PAM).
Signed-off-by: Matt Mackall <mpm@selenic.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1cced971232c..8960f99ea128 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -845,6 +845,7 @@ extern void sched_idle_next(void); extern void set_user_nice(task_t *p, long nice); extern int task_prio(const task_t *p); extern int task_nice(const task_t *p); +extern int can_nice(const task_t *p, const int nice); extern int task_curr(const task_t *p); extern int idle_cpu(int cpu); extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); |