Re: [PATCH mm-unstable v1 2/3] mm/migrate.c: Prevent folio splitting from interacting with KSM

From: xu.xin16

Date: Wed Jul 15 2026 - 05:11:45 EST


> c) Disable KSM THP splitting completely
> d) add a skip_huge_page sysfs toggle
> e) only scan THPs when memory pressure is present
>
> (a)+(b) would be my V2 which I can send out whenever.
>
> (c) is the nuclear option, but perhaps KSM for THP is rather
> inefficient and pointless
>
> (d) could be used with (a) and (b) and allows more flexibility than (c)
>
> (e) is a more dynamic approach, and could be combined with (b) and (d)
>
> Let me know what you think :)
> -- Nico

Maybe (f): contains c+d+e: as a general and compromise approach to maintain
backward compatibility, providing a skip_huge_page switch with three options
— [always], [memory_sufficient], and [never] — could be a viable solution.