Re: [PATCH v3 07/12] mm/khugepaged: add flag to ignore khugepaged_max_ptes_*

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

 



On Wed, Apr 27, 2022 at 2:13 PM Peter Xu <peterx@xxxxxxxxxx> wrote:
>
> On Tue, Apr 26, 2022 at 07:44:07AM -0700, Zach O'Keefe wrote:
> > @@ -2365,6 +2375,7 @@ static int khugepaged(void *none)
> >  {
> >       struct mm_slot *mm_slot;
> >       struct collapse_control cc = {
> > +             .enforce_pte_scan_limits = true,
> >               .last_target_node = NUMA_NO_NODE,
> >               .gfp = &alloc_hugepage_khugepaged_gfpmask,
> >               .alloc_hpage = &khugepaged_alloc_page,
> > @@ -2512,6 +2523,7 @@ int madvise_collapse(struct vm_area_struct *vma, struct vm_area_struct **prev,
> >                    unsigned long start, unsigned long end)
> >  {
> >       struct collapse_control cc = {
> > +             .enforce_pte_scan_limits = false,
> >               .last_target_node = NUMA_NO_NODE,
> >               .hpage = NULL,
> >               .gfp = &alloc_hugepage_madvise_gfpmask,
>
> This changes the semantics of the new madvise().  IMHO it'll be ideal if
> this patch is moved before the introduction of MADV_COLLAPSE, so the new
> madvise() will have a consistent behavior.
>

That makes sense to me, as this was how it was done in the RFC. I'll
assume this applies equally well to "mm/khugepaged: add flag to ignore
page young/referenced requirement" and move both before introducing
the new madvise(2) mode.

Thanks again Peter,
Zach

> --
> Peter Xu
>




[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