aboutsummaryrefslogtreecommitdiffstats
path: root/fs/select.c
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:18:50 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:20:13 -0400
commit13e68a73175041c83713fd1905c65fe612f73862 (patch)
treebe3edeaac8b1b34714dd75d54d17f1ec88ecac35 /fs/select.c
parente82bc71470695e6a8a319962737b4abff85bf0c6 (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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/select.c b/fs/select.c
index f684c750e08a..fd65d1b6aeb6 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -30,6 +30,8 @@
30#include <linux/freezer.h> 30#include <linux/freezer.h>
31#include <net/busy_poll.h> 31#include <net/busy_poll.h>
32 32
33#include <litmus/litmus.h> /* for is_realtime() */
34
33#include <asm/uaccess.h> 35#include <asm/uaccess.h>
34 36
35 37
@@ -79,7 +81,7 @@ long select_estimate_accuracy(struct timespec *tv)
79 * Realtime tasks get a slack of 0 for obvious reasons. 81 * Realtime tasks get a slack of 0 for obvious reasons.
80 */ 82 */
81 83
82 if (rt_task(current)) 84 if (rt_task(current) || is_realtime(current))
83 return 0; 85 return 0;
84 86
85 ktime_get_ts(&now); 87 ktime_get_ts(&now);