The quilt patch titled Subject: mm/khugepaged: remove redundant try_to_freeze() has been removed from the -mm tree. Its filename was mm-khugepaged-remove-redundant-try_to_freeze.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Kevin Hao <haokexin@xxxxxxxxx> Subject: mm/khugepaged: remove redundant try_to_freeze() Date: Wed, 20 Dec 2023 07:17:53 +0800 A freezable kernel thread can enter frozen state during freezing by either calling try_to_freeze() or using wait_event_freezable() and its variants. However, there is no need to use both methods simultaneously. The freezable wait variants have been used in khugepaged_wait_work() and khugepaged_alloc_sleep(), so remove this redundant try_to_freeze(). I used the following stress-ng command to generate some memory load on my Intel Alder Lake board (24 CPUs, 32G memory). stress-ng --vm 48 --vm-bytes 90% The worst freezing latency is: Freezing user space processes Freezing user space processes completed (elapsed 0.040 seconds) OOM killer disabled. Freezing remaining freezable tasks Freezing remaining freezable tasks completed (elapsed 0.001 seconds) Without the faked memory load, the freezing latency is: Freezing user space processes Freezing user space processes completed (elapsed 0.000 seconds) OOM killer disabled. Freezing remaining freezable tasks Freezing remaining freezable tasks completed (elapsed 0.001 seconds) I didn't see any observable difference whether this patch is applied or not. Link: https://lkml.kernel.org/r/20231219231753.683171-1-haokexin@xxxxxxxxx Signed-off-by: Kevin Hao <haokexin@xxxxxxxxx> Cc: Pavel Machek <pavel@xxxxxx> Cc: Rafael J. Wysocki <rafael@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/khugepaged.c~mm-khugepaged-remove-redundant-try_to_freeze +++ a/mm/khugepaged.c @@ -2499,7 +2499,7 @@ static void khugepaged_do_scan(struct co while (true) { cond_resched(); - if (unlikely(kthread_should_stop() || try_to_freeze())) + if (unlikely(kthread_should_stop())) break; spin_lock(&khugepaged_mm_lock); _ Patches currently in -mm which might be from haokexin@xxxxxxxxx are nilfs2-add-missing-set_freezable-for-freezable-kthread.patch