summaryrefslogtreecommitdiff
path: root/include/linux/in.h
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2015-02-12 02:27:15 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-12 04:06:04 +0300
commitbe97a41b291e495d6cb767b3ee0f84ed05804892 (patch)
tree9cb11c679252de5a1d921f24e4693640f8aa47dc /include/linux/in.h
parent077fcf116c8c2bd7ee9487b645aa3b50368db7e1 (diff)
downloadlinux-be97a41b291e495d6cb767b3ee0f84ed05804892.tar.xz
mm/mempolicy.c: merge alloc_hugepage_vma to alloc_pages_vma
The previous commit ("mm/thp: Allocate transparent hugepages on local node") introduced alloc_hugepage_vma() to mm/mempolicy.c to perform a special policy for THP allocations. The function has the same interface as alloc_pages_vma(), shares a lot of boilerplate code and a long comment. This patch merges the hugepage special case into alloc_pages_vma. The extra if condition should be cheap enough price to pay. We also prevent a (however unlikely) race with parallel mems_allowed update, which could make hugepage allocation restart only within the fallback call to alloc_hugepage_vma() and not reconsider the special rule in alloc_hugepage_vma(). Also by making sure mpol_cond_put(pol) is always called before actual allocation attempt, we can use a single exit path within the function. Also update the comment for missing node parameter and obsolete reference to mm_sem. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: David Rientjes <rientjes@google.com> Cc: 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 'include/linux/in.h')
0 files changed, 0 insertions, 0 deletions