From 9cd62c8dc5bad42f2de65e9a50fed0fe2608a162 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Sun, 9 Aug 2015 13:18:50 +0200 Subject: 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. --- fs/select.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs') 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 @@ #include #include +#include /* for is_realtime() */ + #include @@ -80,7 +82,7 @@ u64 select_estimate_accuracy(struct timespec64 *tv) * Realtime tasks get a slack of 0 for obvious reasons. */ - if (rt_task(current)) + if (rt_task(current) || is_realtime(current)) return 0; ktime_get_ts64(&now); -- cgit v1.2.2