aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page-writeback.c6
-rw-r--r--mm/page_alloc.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index eb59f7eea508..7e39ffceb566 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -41,6 +41,8 @@
41 41
42#include "internal.h" 42#include "internal.h"
43 43
44#include <litmus/litmus.h> /* for is_realtime() */
45
44/* 46/*
45 * Sleep at most 200ms at a time in balance_dirty_pages(). 47 * Sleep at most 200ms at a time in balance_dirty_pages().
46 */ 48 */
@@ -279,7 +281,7 @@ void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty)
279 if (background >= dirty) 281 if (background >= dirty)
280 background = dirty / 2; 282 background = dirty / 2;
281 tsk = current; 283 tsk = current;
282 if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) { 284 if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk) || is_realtime(tsk)) {
283 background += background / 4; 285 background += background / 4;
284 dirty += dirty / 4; 286 dirty += dirty / 4;
285 } 287 }
@@ -307,7 +309,7 @@ static unsigned long zone_dirty_limit(struct zone *zone)
307 else 309 else
308 dirty = vm_dirty_ratio * zone_memory / 100; 310 dirty = vm_dirty_ratio * zone_memory / 100;
309 311
310 if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) 312 if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk) || is_realtime(tsk))
311 dirty += dirty / 4; 313 dirty += dirty / 4;
312 314
313 return dirty; 315 return dirty;
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ebffa0e4a9c0..950c002bbb45 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -63,6 +63,9 @@
63#include <linux/page_owner.h> 63#include <linux/page_owner.h>
64 64
65#include <asm/sections.h> 65#include <asm/sections.h>
66
67#include <litmus/litmus.h> /* for is_realtime() */
68
66#include <asm/tlbflush.h> 69#include <asm/tlbflush.h>
67#include <asm/div64.h> 70#include <asm/div64.h>
68#include "internal.h" 71#include "internal.h"
@@ -2617,7 +2620,8 @@ gfp_to_alloc_flags(gfp_t gfp_mask)
2617 * comment for __cpuset_node_allowed(). 2620 * comment for __cpuset_node_allowed().
2618 */ 2621 */
2619 alloc_flags &= ~ALLOC_CPUSET; 2622 alloc_flags &= ~ALLOC_CPUSET;
2620 } else if (unlikely(rt_task(current)) && !in_interrupt()) 2623 } else if (unlikely(rt_task(current) || is_realtime(current))
2624 && !in_interrupt())
2621 alloc_flags |= ALLOC_HARDER; 2625 alloc_flags |= ALLOC_HARDER;
2622 2626
2623 if (likely(!(gfp_mask & __GFP_NOMEMALLOC))) { 2627 if (likely(!(gfp_mask & __GFP_NOMEMALLOC))) {