Re: [v2 PATCH 3/5] mm: migrate: skip shared exec THP for NUMA balancing
From: Matthew Wilcox
Date: Tue Nov 10 2020 - 13:16:54 EST
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?