aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2013-06-08 12:22:35 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2013-08-07 03:46:53 -0400
commit0cc482ccaf2efdc8bdb674a67ebe7d36cd06ce39 (patch)
treea08c83494d0fe0e095d2acf5daca527ae78e0cd7 /mm/page_alloc.c
parent44bbdeefae36fd3926eeccce4e715d91d5ffe6a0 (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 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2ee0fd313f03..65299391e760 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"
@@ -2362,7 +2364,8 @@ gfp_to_alloc_flags(gfp_t gfp_mask)
2362 * See also cpuset_zone_allowed() comment in kernel/cpuset.c. 2364 * See also cpuset_zone_allowed() comment in kernel/cpuset.c.
2363 */ 2365 */
2364 alloc_flags &= ~ALLOC_CPUSET; 2366 alloc_flags &= ~ALLOC_CPUSET;
2365 } else if (unlikely(rt_task(current)) && !in_interrupt()) 2367 } else if (unlikely(rt_task(current) || is_realtime(current))
2368 && !in_interrupt())
2366 alloc_flags |= ALLOC_HARDER; 2369 alloc_flags |= ALLOC_HARDER;
2367 2370
2368 if (likely(!(gfp_mask & __GFP_NOMEMALLOC))) { 2371 if (likely(!(gfp_mask & __GFP_NOMEMALLOC))) {