summaryrefslogtreecommitdiff
path: root/mm/memory.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2011-07-28 08:43:51 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:19:53 (GMT)
commit24a92055470f7d51209baa08bc015564438d0e8a (patch)
treeba50dfbb23c0c5633e27e7f42d729634550cf3c2 /mm/memory.c
parent29b03268a7cca25fc60f2b5ec62c85f426f48257 (diff)
downloadlinux-fsl-qoriq-24a92055470f7d51209baa08bc015564438d0e8a.tar.xz
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 [tglx@linutronix.de: Get rid of the per cpu variable and store the idx and the pte content right away in the task struct. Shortens the context switch code. ]
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 5771e09..0dcdc84 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3745,6 +3745,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
@@ -3762,6 +3763,7 @@ void pagefault_enable(void)
*/
barrier();
current->pagefault_disabled--;
+ migrate_enable();
}
EXPORT_SYMBOL(pagefault_enable);
#endif