linux/arch
Tejun Heo d5e28005a1 percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit
With the embed percpu first chunk allocator, x86 uses either PAGE_SIZE
or PMD_SIZE for atom_size.  PMD_SIZE is used when CPU supports PSE so
that percpu areas are aligned to PMD mappings and possibly allow using
PMD mappings in vmalloc areas in the future.  Using larger atom_size
doesn't waste actual memory; however, it does require larger vmalloc
space allocation later on for !first chunks.

With reasonably sized vmalloc area, PMD_SIZE shouldn't be a problem
but x86_32 at this point is anything but reasonable in terms of
address space and using larger atom_size reportedly leads to frequent
percpu allocation failures on certain setups.

As there is no reason to not use PMD_SIZE on x86_64 as vmalloc space
is aplenty and most x86_64 configurations support PSE, fix the issue
by always using PMD_SIZE on x86_64 and PAGE_SIZE on x86_32.

v2: drop cpu_has_pse test and make x86_64 always use PMD_SIZE and
    x86_32 PAGE_SIZE as suggested by hpa.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Yanmin Zhang <yanmin.zhang@intel.com>
Reported-by: ShuoX Liu <shuox.liu@intel.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
LKML-Reference: <4F97BA98.6010001@intel.com>
Cc: stable@vger.kernel.org
2012-05-08 09:42:18 -07:00
..
alpha Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
arm MMC highlights for 3.4: 2012-03-28 20:59:45 -07:00
avr32 Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
blackfin Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
c6x Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
cris Delete all instances of asm/system.h 2012-03-28 18:30:03 +01:00
frv Delete all instances of asm/system.h 2012-03-28 18:30:03 +01:00
h8300 Delete all instances of asm/system.h 2012-03-28 18:30:03 +01:00
hexagon Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
ia64 Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-28 17:19:28 -07:00
m32r Delete all instances of asm/system.h 2012-03-28 18:30:03 +01:00
m68k Delete all instances of asm/system.h 2012-03-28 18:30:03 +01:00
microblaze Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
mips Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
mn10300 Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
openrisc Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
parisc Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
powerpc Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
s390 Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
score Delete all instances of asm/system.h 2012-03-28 18:30:03 +01:00
sh Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
sparc Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
tile Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-28 17:19:28 -07:00
um Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
unicore32 Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
x86 percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit 2012-05-08 09:42:18 -07:00
xtensa Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
.gitignore
Kconfig nmi watchdog: do not use cpp symbol in Kconfig 2012-03-23 16:58:31 -07:00