]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/mm: Make sure a local_irq_disable prevent a parallel THP split
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Sat, 15 Mar 2014 10:47:58 +0000 (16:17 +0530)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 23 Mar 2014 22:48:34 +0000 (09:48 +1100)
We have generic code like the one in get_futex_key that assume that
a local_irq_disable prevents a parallel THP split. Support that by
adding a dummy smp call function after setting _PAGE_SPLITTING. Code
paths like get_user_pages_fast still need to check for _PAGE_SPLITTING
after disabling IRQ which indicate that a parallel THP splitting is
ongoing. Now if they don't find _PAGE_SPLITTING set, then we can be
sure that parallel split will now block in pmdp_splitting flush
until we enables IRQ

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/pgtable_64.c

index 62bf5e8e78daaaf5051fb6e5727bfd99be81a088..f6ce1f111f5b143fb338274fb90e704013d47648 100644 (file)
@@ -647,6 +647,11 @@ void pmdp_splitting_flush(struct vm_area_struct *vma,
                if (old & _PAGE_HASHPTE)
                        hpte_do_hugepage_flush(vma->vm_mm, address, pmdp);
        }
+       /*
+        * This ensures that generic code that rely on IRQ disabling
+        * to prevent a parallel THP split work as expected.
+        */
+       kick_all_cpus_sync();
 }
 
 /*