]> git.baikalelectronics.ru Git - kernel.git/commit
SLUB: Write to per cpu data when allocating it
authorChristoph Lameter <cl@linux.com>
Thu, 24 Mar 2011 19:51:38 +0000 (14:51 -0500)
committerPekka Enberg <penberg@kernel.org>
Thu, 24 Mar 2011 19:53:07 +0000 (21:53 +0200)
commit6af4207f77d1b22256797e90ccb36f6b53ef862a
treed08a3abe924d54284486839864d73e9d8bba6180
parent4bfd652fcf81449852590ff5cd68d5f2bd7d2f65
SLUB: Write to per cpu data when allocating it

It turns out that the cmpxchg16b emulation has to access vmalloced
percpu memory with interrupts disabled. If the memory has never
been touched before then the fault necessary to establish the
mapping will not to occur and the kernel will fail on boot.

Fix that by reusing the CONFIG_PREEMPT code that writes the
cpu number into a field on every cpu. Writing to the per cpu
area before causes the mapping to be established before we get
to a cmpxchg16b emulation.

Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
mm/slub.c