diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-01-25 15:08:27 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-25 15:08:27 -0500 |
commit | 78f2c7db6068fd6ef75b8c120f04a388848eacb5 (patch) | |
tree | 994e8082a01c78e691bacb90c0f8368823c87767 /include/asm-generic | |
parent | fa717060f1ab7eb6570f2fb49136f838fc9195a9 (diff) |
sched: SCHED_FIFO/SCHED_RR watchdog timer
Introduce a new rlimit that allows the user to set a runtime timeout on
real-time tasks their slice. Once this limit is exceeded the task will receive
SIGXCPU.
So it measures runtime since the last sleep.
Input and ideas by Thomas Gleixner and Lennart Poettering.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
CC: Lennart Poettering <mzxreary@0pointer.de>
CC: Michael Kerrisk <mtk.manpages@googlemail.com>
CC: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/resource.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-generic/resource.h b/include/asm-generic/resource.h index a4a22cc35898..587566f95f6c 100644 --- a/include/asm-generic/resource.h +++ b/include/asm-generic/resource.h | |||
@@ -44,8 +44,8 @@ | |||
44 | #define RLIMIT_NICE 13 /* max nice prio allowed to raise to | 44 | #define RLIMIT_NICE 13 /* max nice prio allowed to raise to |
45 | 0-39 for nice level 19 .. -20 */ | 45 | 0-39 for nice level 19 .. -20 */ |
46 | #define RLIMIT_RTPRIO 14 /* maximum realtime priority */ | 46 | #define RLIMIT_RTPRIO 14 /* maximum realtime priority */ |
47 | 47 | #define RLIMIT_RTTIME 15 /* timeout for RT tasks in us */ | |
48 | #define RLIM_NLIMITS 15 | 48 | #define RLIM_NLIMITS 16 |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * SuS says limits have to be unsigned. | 51 | * SuS says limits have to be unsigned. |
@@ -86,6 +86,7 @@ | |||
86 | [RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, \ | 86 | [RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, \ |
87 | [RLIMIT_NICE] = { 0, 0 }, \ | 87 | [RLIMIT_NICE] = { 0, 0 }, \ |
88 | [RLIMIT_RTPRIO] = { 0, 0 }, \ | 88 | [RLIMIT_RTPRIO] = { 0, 0 }, \ |
89 | [RLIMIT_RTTIME] = { RLIM_INFINITY, RLIM_INFINITY }, \ | ||
89 | } | 90 | } |
90 | 91 | ||
91 | #endif /* __KERNEL__ */ | 92 | #endif /* __KERNEL__ */ |