diff options
author | Peter Zijlstra <peterz@infradead.org> | 2011-07-28 10:43:51 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@rostedt.homelinux.com> | 2012-10-08 14:46:04 -0400 |
commit | a25472c5123c3588ae9dc400093139877f9bb647 (patch) | |
tree | cbf900aba8cd19d4e7276ad0759415bd38714a59 /mm | |
parent | a2dcac9e5b3fe0542dcea3e40f6bc685b0019041 (diff) |
mm, rt: kmap_atomic scheduling
In fact, with migrate_disable() existing one could play games with
kmap_atomic. You could save/restore the kmap_atomic slots on context
switch (if there are any in use of course), this should be esp easy now
that we have a kmap_atomic stack.
Something like the below.. it wants replacing all the preempt_disable()
stuff with pagefault_disable() && migrate_disable() of course, but then
you can flip kmaps around like below.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
[dvhart@linux.intel.com: build fix]
Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c index ff0a47e0bffd..8ec93d5cb44f 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3439,6 +3439,7 @@ unlock: #ifdef CONFIG_PREEMPT_RT_FULL void pagefault_disable(void) { + migrate_disable(); current->pagefault_disabled++; /* * make sure to have issued the store before a pagefault @@ -3456,6 +3457,7 @@ void pagefault_enable(void) */ barrier(); current->pagefault_disabled--; + migrate_enable(); } EXPORT_SYMBOL_GPL(pagefault_enable); #endif |