Re: [PATCH 2/2] mm/mempolicy: Skip walking HUGETLB vma if MPOL_MF_STRICT is specified alone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add cc to
Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>
Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
, who has been worked on this part

On 2020-01-14 at 17:16 Li Xinhai wrote:
>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
>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux