Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934020Ab1CXTvp (ORCPT ); Thu, 24 Mar 2011 15:51:45 -0400 Received: from smtp108.prem.mail.ac4.yahoo.com ([76.13.13.47]:24699 "HELO smtp108.prem.mail.ac4.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S933934Ab1CXTvn (ORCPT ); Thu, 24 Mar 2011 15:51:43 -0400 X-Yahoo-SMTP: _Dag8S.swBC1p4FJKLCXbs8NQzyse1SYSgnAbY0- X-YMail-OSG: xUGcm6wVM1m8Yuhc.VBOBDtRiNcEmOy8cS6MY.wCGgE06Wz QzoEzYXDe2Dt3bAY5bot2sXy_TxYSUqFV2IQrqz12RrSWH_n1YApkNZEnvFo mGomrroFSXtX2w6At_j2Kxo9fTDsNISjK2CULcVv3tOjqRexa83WoppP_Pj. XRjLg4XeQz8.UoyPIl1SZVOWhiuCLtU.l7ylPMmwHsrzhZZNEh.hlo0y.D4l _kQvyG8.DZpIfQsPNbecbcUmua_D0gwdwEKcIvsFjVT4EOYWfgdeOsxq8lEc 9fGKqQXdyLdYHiWzpleIK7x.MBLtJEwYtAV0xbb56p_zJBQ-- X-Yahoo-Newman-Property: ymail-3 Date: Thu, 24 Mar 2011 14:51:38 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@router.home To: Pekka Enberg cc: Ingo Molnar , Eric Dumazet , torvalds@linux-foundation.org, akpm@linux-foundation.org, tj@kernel.org, npiggin@kernel.dk, rientjes@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [GIT PULL] SLAB changes for v2.6.39-rc1 In-Reply-To: Message-ID: References: <1300990853.3747.189.camel@edumazet-laptop> <20110324185903.GA30510@elte.hu> <20110324193647.GA7957@elte.hu> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1536 Lines: 43 On Thu, 24 Mar 2011, Pekka Enberg wrote: > Thanks, Ingo! Christoph, may I have your sign-off for the patch and > I'll send it to Linus? Subject: 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 Signed-off-by: Christoph Lameter --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2011-03-24 14:03:10.000000000 -0500 +++ linux-2.6/mm/slub.c 2011-03-24 14:04:08.000000000 -0500 @@ -1604,7 +1604,7 @@ static inline void note_cmpxchg_failure( void init_kmem_cache_cpus(struct kmem_cache *s) { -#if defined(CONFIG_CMPXCHG_LOCAL) && defined(CONFIG_PREEMPT) +#ifdef CONFIG_CMPXCHG_LOCAL int cpu; for_each_possible_cpu(cpu) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/