From patchwork Thu Aug 6 03:52:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 30823 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 2013DB7087 for ; Thu, 6 Aug 2009 13:53:22 +1000 (EST) Received: by ozlabs.org (Postfix) id 13711DDDA0; Thu, 6 Aug 2009 13:53:22 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (bilbo.ozlabs.org [203.10.76.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bilbo.ozlabs.org", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 10E03DDD0B for ; Thu, 6 Aug 2009 13:53:22 +1000 (EST) Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 28164B7DD3 for ; Thu, 6 Aug 2009 13:53:05 +1000 (EST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 8B5D2B7063 for ; Thu, 6 Aug 2009 13:52:58 +1000 (EST) Received: by ozlabs.org (Postfix) id 7DCF4DDD0B; Thu, 6 Aug 2009 13:52:58 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CE6CBDDD01 for ; Thu, 6 Aug 2009 13:52:57 +1000 (EST) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id n763qZVL004079; Wed, 5 Aug 2009 22:52:38 -0500 Subject: Re: Next July 29 : Hugetlb test failure (OOPS free_hugepte_range) From: Benjamin Herrenschmidt To: Sachin Sant In-Reply-To: <4A796237.6070302@in.ibm.com> References: <20090729173611.b82478cd.sfr@canb.auug.org.au> <4A706504.6040704@in.ibm.com> <4A719129.5030302@in.ibm.com> <1248957028.1509.85.camel@pasglop> <4A796237.6070302@in.ibm.com> Date: Thu, 06 Aug 2009 13:52:34 +1000 Message-Id: <1249530754.18245.71.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Cc: Stephen Rothwell , linux-next@vger.kernel.org, linuxppc-dev@ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org On Wed, 2009-08-05 at 16:13 +0530, Sachin Sant wrote: > Benjamin Herrenschmidt wrote: > > Thanks. I'll have a look next week. I think when I changed the indices > > I may have forgotten to update something. > > > Ben, > > I can recreate this issue with today's next. > Let me know if i can help in any way to fix this issue. Does this patch fixes it ? [PATCH] powerpc/mm: Fix encoding of page table cache numbers The mask used to encode the page table cache number in the batch when freeing page tables was too small for the new possible values of MMU page sizes. This increases it along with a comment explaining the constraints. Signed-off-by: Benjamin Herrenschmidt Tested-by: Sachin Sant --- arch/powerpc/include/asm/pgalloc.h | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/pgalloc.h b/arch/powerpc/include/asm/pgalloc.h index 34b0806..f2e812d 100644 --- a/arch/powerpc/include/asm/pgalloc.h +++ b/arch/powerpc/include/asm/pgalloc.h @@ -28,7 +28,12 @@ typedef struct pgtable_free { unsigned long val; } pgtable_free_t; -#define PGF_CACHENUM_MASK 0x7 +/* This needs to be big enough to allow for MMU_PAGE_COUNT + 2 to be stored + * and small enough to fit in the low bits of any naturally aligned page + * table cache entry. Arbitrarily set to 0x1f, that should give us some + * room to grow + */ +#define PGF_CACHENUM_MASK 0x1f static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum, unsigned long mask)