diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-03-26 23:28:51 +0100 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2010-07-27 17:49:09 +0200 |
commit | a0d40c80256e31b23849f2ba781b74bf0218a1fa (patch) | |
tree | f89ad006e486c021d95db3f37763558556d731e1 /mm | |
parent | xen: Add xen_create_contiguous_region (diff) | |
download | linux-a0d40c80256e31b23849f2ba781b74bf0218a1fa.tar.xz linux-a0d40c80256e31b23849f2ba781b74bf0218a1fa.zip |
vmap: add flag to allow lazy unmap to be disabled at runtime
Add a flag to force lazy_max_pages() to zero to prevent any outstanding
mapped pages. We'll need this for Xen.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmalloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index ae007462b7f6..7f35fe2cf9e7 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -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); |