Re: [stable-6.6.y] mm: khugepaged refuses to freeze

From: David Hildenbrand (Arm)

Date: Fri Feb 06 2026 - 04:00:36 EST


I recall that there is a notifier when the system is preparing to sleep (pm notifier or something). Could we simply hook into that to tell khugepaged to suspend+resume?

Do you mean “struct dev_pm_ops”, which is used to register PM callbacks for devices? However, I don’t know how to use it with a kernel thread.

Also look at how kswapd does it, kswapd also uses kthread_freezable_should_stop() to check the freeze state.

Right, mimicking what kswapd does sound reasonable!

--
Cheers,

David