diff options
author | 2011-08-18 21:56:42 +0200 | |
---|---|---|
committer | 2011-08-18 21:56:47 +0200 | |
commit | 8bc84f87315e8bdbe242ba788fdc6a74d653b177 (patch) | |
tree | b96fef5c82de40cb2a5bfe6f29699f1c820513cd /mm/vmalloc.c | |
parent | watchdog: Make the kthreads NUMA affine (diff) | |
parent | Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (diff) | |
download | wireguard-linux-8bc84f87315e8bdbe242ba788fdc6a74d653b177.tar.xz wireguard-linux-8bc84f87315e8bdbe242ba788fdc6a74d653b177.zip |
Merge branch 'perf/urgent' into perf/core
Merge reason: add the latest fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 464621d18eb2..7ef0903058ee 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -725,9 +725,10 @@ static void free_unmap_vmap_area_addr(unsigned long addr) #define VMAP_BBMAP_BITS_MIN (VMAP_MAX_ALLOC*2) #define VMAP_MIN(x, y) ((x) < (y) ? (x) : (y)) /* can't use min() */ #define VMAP_MAX(x, y) ((x) > (y) ? (x) : (y)) /* can't use max() */ -#define VMAP_BBMAP_BITS VMAP_MIN(VMAP_BBMAP_BITS_MAX, \ - VMAP_MAX(VMAP_BBMAP_BITS_MIN, \ - VMALLOC_PAGES / NR_CPUS / 16)) +#define VMAP_BBMAP_BITS \ + VMAP_MIN(VMAP_BBMAP_BITS_MAX, \ + VMAP_MAX(VMAP_BBMAP_BITS_MIN, \ + VMALLOC_PAGES / roundup_pow_of_two(NR_CPUS) / 16)) #define VMAP_BLOCK_SIZE (VMAP_BBMAP_BITS * PAGE_SIZE) |