summaryrefslogtreecommitdiffstats
path: root/mm/mempolicy.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2011-02-25 14:44:28 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-25 15:07:37 -0800
commit8eac563c1c3a2047083022357ae63722b19e4e08 (patch)
tree724280edfbf6bd8206b0cc0337ee242d2a2518e0 /mm/mempolicy.c
parent7137c6bd455234bcb7560fd829e6ee49cae5fed6 (diff)
downloadblackbird-op-linux-8eac563c1c3a2047083022357ae63722b19e4e08.tar.gz
blackbird-op-linux-8eac563c1c3a2047083022357ae63722b19e4e08.zip
thp: fix interleaving for transparent hugepages
The THP code didn't pass the correct interleaving shift to the memory policy code. Fix this here by adjusting for the order. Signed-off-by: Andi Kleen <ak@linux.intel.com> Reviewed-by: Christoph Lameter <cl@linux.com> Acked-by: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r--mm/mempolicy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 368fc9d23610..49355a970be2 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();
OpenPOWER on IntegriCloud