diff options
-rw-r--r-- | fs/select.c | 4 | ||||
-rw-r--r-- | kernel/hrtimer.c | 3 | ||||
-rw-r--r-- | kernel/mutex.c | 5 | ||||
-rw-r--r-- | mm/page-writeback.c | 6 | ||||
-rw-r--r-- | mm/page_alloc.c | 5 |
5 files changed, 17 insertions, 6 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); |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index c7f0c79b2cb5..60b6329ab222 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/timer.h> | 49 | #include <linux/timer.h> |
50 | 50 | ||
51 | #include <litmus/debug_trace.h> | 51 | #include <litmus/debug_trace.h> |
52 | #include <litmus/litmus.h> | ||
52 | 53 | ||
53 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
54 | 55 | ||
@@ -1701,7 +1702,7 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp, | |||
1701 | unsigned long slack; | 1702 | unsigned long slack; |
1702 | 1703 | ||
1703 | slack = current->timer_slack_ns; | 1704 | slack = current->timer_slack_ns; |
1704 | if (rt_task(current)) | 1705 | if (rt_task(current) || is_realtime(current)) |
1705 | slack = 0; | 1706 | slack = 0; |
1706 | 1707 | ||
1707 | hrtimer_init_on_stack(&t.timer, clockid, mode); | 1708 | hrtimer_init_on_stack(&t.timer, clockid, mode); |
diff --git a/kernel/mutex.c b/kernel/mutex.c index ad53a664f113..a60d05e9498f 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/debug_locks.h> | 26 | #include <linux/debug_locks.h> |
27 | 27 | ||
28 | #include <litmus/litmus.h> | ||
29 | |||
28 | /* | 30 | /* |
29 | * In the DEBUG case we are using the "NULL fastpath" for mutexes, | 31 | * In the DEBUG case we are using the "NULL fastpath" for mutexes, |
30 | * which forces all calls into the slowpath: | 32 | * which forces all calls into the slowpath: |
@@ -325,7 +327,8 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, | |||
325 | * we're an RT task that will live-lock because we won't let | 327 | * we're an RT task that will live-lock because we won't let |
326 | * the owner complete. | 328 | * the owner complete. |
327 | */ | 329 | */ |
328 | if (!owner && (need_resched() || rt_task(task))) | 330 | if (!owner && (need_resched() || |
331 | rt_task(task) || is_realtime(task))) | ||
329 | break; | 332 | break; |
330 | 333 | ||
331 | /* | 334 | /* |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 73cbc5dc150b..1f0073b95d17 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -38,6 +38,8 @@ | |||
38 | #include <linux/sched/rt.h> | 38 | #include <linux/sched/rt.h> |
39 | #include <trace/events/writeback.h> | 39 | #include <trace/events/writeback.h> |
40 | 40 | ||
41 | #include <litmus/litmus.h> /* for is_realtime() */ | ||
42 | |||
41 | /* | 43 | /* |
42 | * Sleep at most 200ms at a time in balance_dirty_pages(). | 44 | * Sleep at most 200ms at a time in balance_dirty_pages(). |
43 | */ | 45 | */ |
@@ -300,7 +302,7 @@ void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty) | |||
300 | if (background >= dirty) | 302 | if (background >= dirty) |
301 | background = dirty / 2; | 303 | background = dirty / 2; |
302 | tsk = current; | 304 | tsk = current; |
303 | if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) { | 305 | if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk) || is_realtime(tsk)) { |
304 | background += background / 4; | 306 | background += background / 4; |
305 | dirty += dirty / 4; | 307 | dirty += dirty / 4; |
306 | } | 308 | } |
@@ -328,7 +330,7 @@ static unsigned long zone_dirty_limit(struct zone *zone) | |||
328 | else | 330 | else |
329 | dirty = vm_dirty_ratio * zone_memory / 100; | 331 | dirty = vm_dirty_ratio * zone_memory / 100; |
330 | 332 | ||
331 | if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) | 333 | if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk) || is_realtime(tsk)) |
332 | dirty += dirty / 4; | 334 | dirty += dirty / 4; |
333 | 335 | ||
334 | return dirty; | 336 | return dirty; |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 0ab02fb8e9b1..4b5a7f2108c7 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -61,6 +61,8 @@ | |||
61 | #include <linux/hugetlb.h> | 61 | #include <linux/hugetlb.h> |
62 | #include <linux/sched/rt.h> | 62 | #include <linux/sched/rt.h> |
63 | 63 | ||
64 | #include <litmus/litmus.h> /* for is_realtime() */ | ||
65 | |||
64 | #include <asm/tlbflush.h> | 66 | #include <asm/tlbflush.h> |
65 | #include <asm/div64.h> | 67 | #include <asm/div64.h> |
66 | #include "internal.h" | 68 | #include "internal.h" |
@@ -2364,7 +2366,8 @@ gfp_to_alloc_flags(gfp_t gfp_mask) | |||
2364 | * See also cpuset_zone_allowed() comment in kernel/cpuset.c. | 2366 | * See also cpuset_zone_allowed() comment in kernel/cpuset.c. |
2365 | */ | 2367 | */ |
2366 | alloc_flags &= ~ALLOC_CPUSET; | 2368 | alloc_flags &= ~ALLOC_CPUSET; |
2367 | } else if (unlikely(rt_task(current)) && !in_interrupt()) | 2369 | } else if (unlikely(rt_task(current) || is_realtime(current)) |
2370 | && !in_interrupt()) | ||
2368 | alloc_flags |= ALLOC_HARDER; | 2371 | alloc_flags |= ALLOC_HARDER; |
2369 | 2372 | ||
2370 | if (likely(!(gfp_mask & __GFP_NOMEMALLOC))) { | 2373 | if (likely(!(gfp_mask & __GFP_NOMEMALLOC))) { |