On 6 Feb 2026, at 2:04, Qiliang Yuan wrote: > The kcompactd threads should respect the housekeeping mask for kthreads > (HK_TYPE_KTHREAD) to avoid running on isolated CPUs. Currently, they > are created without explicit affinity constraints beyond the node > preference. > > Add housekeeping_affine() to kcompactd_run() to set initial affinity, > and register a housekeeping notifier to update kcompactd affinity > when the HK_TYPE_KTHREAD mask is changed at runtime. >
How about khugepaged and kswapd? khugepaged thread is created in start_stop_khugepaged() from mm/khugepaged.c. kswapd threads are created in kswapd_init() from mm/vmscan.c. > Signed-off-by: Qiliang Yuan <[email protected]> > Signed-off-by: Qiliang Yuan <[email protected]> > --- > mm/compaction.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > Best Regards, Yan, Zi

