diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/percpu.h | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 8ff15153ae2..54a968b4b92 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -85,31 +85,20 @@ | |||
85 | 85 | ||
86 | /* | 86 | /* |
87 | * PERCPU_DYNAMIC_RESERVE indicates the amount of free area to piggy | 87 | * PERCPU_DYNAMIC_RESERVE indicates the amount of free area to piggy |
88 | * back on the first chunk if arch is manually allocating and mapping | 88 | * back on the first chunk for dynamic percpu allocation if arch is |
89 | * it for faster access (as a part of large page mapping for example). | 89 | * manually allocating and mapping it for faster access (as a part of |
90 | * Note that dynamic percpu allocator covers both static and dynamic | 90 | * large page mapping for example). |
91 | * areas, so these values are bigger than PERCPU_MODULE_RESERVE. | ||
92 | * | 91 | * |
93 | * On typical configuration with modules, the following values leave | 92 | * The following values give between one and two pages of free space |
94 | * about 8k of free space on the first chunk after boot on both x86_32 | 93 | * after typical minimal boot (2-way SMP, single disk and NIC) with |
95 | * and 64 when module support is enabled. When module support is | 94 | * both defconfig and a distro config on x86_64 and 32. More |
96 | * disabled, it's much tighter. | 95 | * intelligent way to determine this would be nice. |
97 | */ | 96 | */ |
98 | #ifndef PERCPU_DYNAMIC_RESERVE | 97 | #if BITS_PER_LONG > 32 |
99 | # if BITS_PER_LONG > 32 | 98 | #define PERCPU_DYNAMIC_RESERVE (20 << 10) |
100 | # ifdef CONFIG_MODULES | 99 | #else |
101 | # define PERCPU_DYNAMIC_RESERVE (24 << 10) | 100 | #define PERCPU_DYNAMIC_RESERVE (12 << 10) |
102 | # else | 101 | #endif |
103 | # define PERCPU_DYNAMIC_RESERVE (16 << 10) | ||
104 | # endif | ||
105 | # else | ||
106 | # ifdef CONFIG_MODULES | ||
107 | # define PERCPU_DYNAMIC_RESERVE (16 << 10) | ||
108 | # else | ||
109 | # define PERCPU_DYNAMIC_RESERVE (8 << 10) | ||
110 | # endif | ||
111 | # endif | ||
112 | #endif /* PERCPU_DYNAMIC_RESERVE */ | ||
113 | 102 | ||
114 | extern void *pcpu_base_addr; | 103 | extern void *pcpu_base_addr; |
115 | 104 | ||