]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/vmalloc.c
vmap: add flag to allow lazy unmap to be disabled at runtime
[karo-tx-linux.git] / mm / vmalloc.c
index ae007462b7f6e8c2463d83edc2d202107f996a32..7f35fe2cf9e7cbbef465fe1b985608e8c1f99d84 100644 (file)
@@ -31,6 +31,7 @@
 #include <asm/tlbflush.h>
 #include <asm/shmparam.h>
 
+bool vmap_lazy_unmap __read_mostly = true;
 
 /*** Page table manipulation functions ***/
 
@@ -502,6 +503,9 @@ static unsigned long lazy_max_pages(void)
 {
        unsigned int log;
 
+       if (!vmap_lazy_unmap)
+               return 0;
+
        log = fls(num_online_cpus());
 
        return log * (32UL * 1024 * 1024 / PAGE_SIZE);