diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-06-08 12:22:35 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-08-07 03:46:53 -0400 |
commit | 0cc482ccaf2efdc8bdb674a67ebe7d36cd06ce39 (patch) | |
tree | a08c83494d0fe0e095d2acf5daca527ae78e0cd7 /fs/select.c | |
parent | 44bbdeefae36fd3926eeccce4e715d91d5ffe6a0 (diff) |
Augment rt_task() with is_realtime()
Whenever the kernel checks for rt_task() to avoid delaying real-time
tasks, we want it to also not delay LITMUS^RT tasks. Hence, most
calls to rt_task() should be matched by an equivalent call to
is_realtime().
Notably, this affects the implementations of select() and nanosleep(),
which use timer_slack_ns when setting up timers for non-real-time
tasks.
Diffstat (limited to 'fs/select.c')
-rw-r--r-- | fs/select.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/select.c b/fs/select.c index 8c1c96c27062..f53b3e421c26 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <linux/hrtimer.h> | 28 | #include <linux/hrtimer.h> |
29 | #include <linux/sched/rt.h> | 29 | #include <linux/sched/rt.h> |
30 | 30 | ||
31 | #include <litmus/litmus.h> /* for is_realtime() */ | ||
32 | |||
31 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
32 | 34 | ||
33 | 35 | ||
@@ -77,7 +79,7 @@ long select_estimate_accuracy(struct timespec *tv) | |||
77 | * Realtime tasks get a slack of 0 for obvious reasons. | 79 | * Realtime tasks get a slack of 0 for obvious reasons. |
78 | */ | 80 | */ |
79 | 81 | ||
80 | if (rt_task(current)) | 82 | if (rt_task(current) || is_realtime(current)) |
81 | return 0; | 83 | return 0; |
82 | 84 | ||
83 | ktime_get_ts(&now); | 85 | ktime_get_ts(&now); |