Re: [v2 PATCH 3/5] mm: migrate: skip shared exec THP for NUMA balancing
From: Yang Shi
Date: Tue Nov 10 2020 - 13:58:45 EST
On Tue, Nov 10, 2020 at 10:16 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> On Tue, Nov 10, 2020 at 10:12:48AM -0800, Yang Shi wrote:
> > @@ -2142,6 +2151,10 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
> > int page_lru = page_is_file_lru(page);
> > unsigned long start = address & HPAGE_PMD_MASK;
> >
> > + if (IS_ENABLED(CONFIG_READ_ONLY_THP_FOR_FS) &&
> > + is_shared_exec_page(vma, page))
> > + goto out;
>
> Why include the IS_ENABLED() check? Once the ~50 patches I have pending
> go in, shared executable THPs can exist without this option. And can't
> we have executables on tmpfs today without this option too?
Aha, yes, thanks for reminding. I had the patches baked in my tree
before your patches were posted.
We could have executables on tmpfs w/o that config. Will remove it. Thanks.