Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758684Ab1CCUAe (ORCPT ); Thu, 3 Mar 2011 15:00:34 -0500 Received: from mga11.intel.com ([192.55.52.93]:5720 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752372Ab1CCUAd (ORCPT ); Thu, 3 Mar 2011 15:00:33 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.62,259,1297065600"; d="scan'208";a="893504096" From: Andi Kleen To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: [PATCH 1/8] Fix interleaving for transparent hugepages v2 Date: Thu, 3 Mar 2011 11:59:44 -0800 Message-Id: <1299182391-6061-2-git-send-email-andi@firstfloor.org> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1299182391-6061-1-git-send-email-andi@firstfloor.org> References: <1299182391-6061-1-git-send-email-andi@firstfloor.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1205 Lines: 36 From: Andi Kleen Bugfix, independent from the rest of the series. The THP code didn't pass the correct interleaving shift to the memory policy code. Fix this here by adjusting for the order. v2: Use + (thanks Christoph) Acked-by: Andrea Arcangeli Reviewed-by: Christoph Lameter Signed-off-by: Andi Kleen --- mm/mempolicy.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 368fc9d..49355a9 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1830,7 +1830,7 @@ alloc_pages_vma(gfp_t gfp, int order, struct vm_area_struct *vma, if (unlikely(pol->mode == MPOL_INTERLEAVE)) { unsigned nid; - nid = interleave_nid(pol, vma, addr, PAGE_SHIFT); + nid = interleave_nid(pol, vma, addr, PAGE_SHIFT + order); mpol_cond_put(pol); page = alloc_page_interleave(gfp, order, nid); put_mems_allowed(); -- 1.7.4 -- 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/