History

mm/vma: move VM_NO_KHUGEPAGED into generic header

Patch series "mm/vma: some more minor changes", v2. The motivation here is to consolidate VMA flags and helpers in generic memory header and reduce code duplication when ever applicable. If there are other possible similar instances which might be missing here, please do let me me know. I will be happy to incorporate them. This patch (of 3): Move VM_NO_KHUGEPAGED into generic header (include/linux/mm.h). This just makes sure that no VMA flag is scattered in individual function files any longer. While at this, fix an old comment which is no longer valid. This should not cause any functional change.

Anshuman Khandual committed 6 years ago

Commit b4443771 parent b2a403f2 files · +3 −3Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/mm.h+3−1
@@ -356,10 +356,12 @@ extern unsigned int kobjsize(const void *objp); · 355 unmodified lines
356 356
357/*357/*
358 * Special vmas that are non-mergable, non-mlock()able.358 * Special vmas that are non-mergable, non-mlock()able.
359 * Note: mm/huge_memory.c VM_NO_THP depends on this definition.
360 */359 */
361#define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_PFNMAP | VM_MIXEDMAP)360#define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_PFNMAP | VM_MIXEDMAP)
362 361
362/* This mask prevents VMA from being scanned with khugepaged */
363#define VM_NO_KHUGEPAGED (VM_SPECIAL | VM_HUGETLB)
364
363/* This mask defines which mm->def_flags a process can inherit its parent */365/* This mask defines which mm->def_flags a process can inherit its parent */
364#define VM_INIT_DEF_MASK VM_NOHUGEPAGE366#define VM_INIT_DEF_MASK VM_NOHUGEPAGE
365 367