Checking MPOL_MF_STRICT is ignored for HUGETLB vma according to mbind man page: Notes MPOL_MF_STRICT is ignored on huge page mappings. If MPOL_MF_STRICT is specified alone without any MOVE flag, we should indicate, from test_walk, that walking this vma should be skipped even if there are misplaced pages. Signed-off-by: Li Xinhai <lixinhai.lxh@xxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> --- mm/mempolicy.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 067cf7d..c117b5f 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -656,6 +656,13 @@ static int queue_pages_test_walk(unsigned long start, unsigned long end, return 1; } + /* MPOL_MF_STRICT is ignored for huge page, skip checking + * misplaced pages + */ + if ((flags & MPOL_MF_VALID) == MPOL_MF_STRICT && + is_vm_hugetlb_page(vma)) + return 1; + /* queue pages from current vma */ if (flags & MPOL_MF_VALID) return 0; -- 1.8.3.1