diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:18:50 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2017-05-26 17:12:30 -0400 |
commit | 9cd62c8dc5bad42f2de65e9a50fed0fe2608a162 (patch) | |
tree | fafa75f7f34d0f1533b64795377e6a82b37d5244 /fs | |
parent | a286e5f00ef48ab8d9b189370441ce90d855b306 (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')
-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 3d4f85defeab..a61843335182 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <net/busy_poll.h> | 31 | #include <net/busy_poll.h> |
32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
33 | 33 | ||
34 | #include <litmus/litmus.h> /* for is_realtime() */ | ||
35 | |||
34 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
35 | 37 | ||
36 | 38 | ||
@@ -80,7 +82,7 @@ u64 select_estimate_accuracy(struct timespec64 *tv) | |||
80 | * Realtime tasks get a slack of 0 for obvious reasons. | 82 | * Realtime tasks get a slack of 0 for obvious reasons. |
81 | */ | 83 | */ |
82 | 84 | ||
83 | if (rt_task(current)) | 85 | if (rt_task(current) || is_realtime(current)) |
84 | return 0; | 86 | return 0; |
85 | 87 | ||
86 | ktime_get_ts64(&now); | 88 | ktime_get_ts64(&now); |