Re: [RFC PATCH 07/14] mm/khugepaged: add vm_flags_ignore to hugepage_vma_revalidate_pmd_count()

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

 



On Thu, Mar 10, 2022 at 7:56 AM David Hildenbrand <david@xxxxxxxxxx> wrote:
>
> On 08.03.22 22:34, Zach O'Keefe wrote:
> > In madvise collapse context, we optionally want to be able to ignore
> > advice from MADV_NOHUGEPAGE-marked regions.
> >
> > Add a vm_flags_ignore argument to hugepage_vma_revalidate_pmd_count()
> > which can be used to ignore vm flags used when considering thp
> > eligibility.
>
> arch/s390/mm/gmap.c:thp_split_mm() sets VM_NOHUGEPAGE to make sure there
> are *really* no thp. Being able to bypass that would break KVM horribly.
>
> Ignoring MADV_NOHUGEPAGE/VM_NOHUGEPAGE feels like the wrong way to go.
>
>
> What about a prctl instead, to disable any khugepagd activity and just
> let that process control it manually?
>
> --
> Thanks,
>
> David / dhildenb
>

Hey David - thanks for reviewing and commenting, and certainly thank
you for finding this bug.

This seems like good motivation for not ignoring VM_NOHUGEPAGE.
arch/powerpc also uses this flag for its own purposes (though it's
user-directed in that particular case).

prctrl(2) sounds very reasonable to me - thanks for the suggestion!

Thanks,
Zach




[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