Commit 8eac563c1c3a2047083022357ae63722b19e4e08
Committed by
Linus Torvalds
1 parent
7137c6bd45
Exists in
master
and in
20 other branches
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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
mm/mempolicy.c
... | ... | @@ -1830,7 +1830,7 @@ |
1830 | 1830 | if (unlikely(pol->mode == MPOL_INTERLEAVE)) { |
1831 | 1831 | unsigned nid; |
1832 | 1832 | |
1833 | - nid = interleave_nid(pol, vma, addr, PAGE_SHIFT); | |
1833 | + nid = interleave_nid(pol, vma, addr, PAGE_SHIFT + order); | |
1834 | 1834 | mpol_cond_put(pol); |
1835 | 1835 | page = alloc_page_interleave(gfp, order, nid); |
1836 | 1836 | put_mems_allowed(); |