From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail191.messagelabs.com (mail191.messagelabs.com [216.82.242.19]) by kanga.kvack.org (Postfix) with SMTP id 7E9898D003A for ; Wed, 2 Mar 2011 19:46:02 -0500 (EST) From: Andi Kleen Subject: [PATCH 1/8] Fix interleaving for transparent hugepages v2 Date: Wed, 2 Mar 2011 16:45:21 -0800 Message-Id: <1299113128-11349-2-git-send-email-andi@firstfloor.org> In-Reply-To: <1299113128-11349-1-git-send-email-andi@firstfloor.org> References: <1299113128-11349-1-git-send-email-andi@firstfloor.org> Sender: owner-linux-mm@kvack.org List-ID: To: akpm@linux-foundation.org Cc: aarcange@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andi Kleen 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org