]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm,slub,x86: decouple size of struct page from CONFIG_CMPXCHG_LOCAL
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 8 Dec 2011 04:41:54 +0000 (15:41 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 Dec 2011 05:48:10 +0000 (16:48 +1100)
commit8a20109f9d81cde88df819d04f86a6c40aafc5ce
treec3b719640add88920c99b8ff029e2aae7c5b04b3
parentd8d741f6cc6da27765e2fb96c98aad5bf2f9bbe0
mm,slub,x86: decouple size of struct page from CONFIG_CMPXCHG_LOCAL

While implementing cmpxchg_double() on s390 I realized that we don't set
CONFIG_CMPXCHG_LOCAL besides the fact that we have support for it.
However setting that option will increase the size of struct page by eight
bytes on 64 bit, which we certainly do not want.  Also, it doesn't make
sense that a present cpu feature should increase the size of struct page.

Besides that it looks like the dependency to CMPXCHG_LOCAL is wrong and
that it should depend on CMPXCHG_DOUBLE instead.

This patch:

If an architecture supports CMPXCHG_LOCAL this shouldn't result
automatically in larger struct pages if the SLUB allocator is used.
Instead introduce a new config option "HAVE_ALIGNED_STRUCT_PAGE" which can
be selected if a double word aligned struct page is required.  Also update
x86 Kconfig so that it should work as before.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/Kconfig
arch/x86/Kconfig
include/linux/mm_types.h
mm/slub.c