[PATCH] mm/khugepaged: Remove unnecessary try_to_freeze()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 unnecessary
try_to_freeze().

Signed-off-by: Kevin Hao <haokexin@xxxxxxxxx>
---
 mm/khugepaged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 1002e9156388..9cdea59fb4c0 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -2499,7 +2499,7 @@ static void khugepaged_do_scan(struct collapse_control *cc)
 	while (true) {
 		cond_resched();
 
-		if (unlikely(kthread_should_stop() || try_to_freeze()))
+		if (unlikely(kthread_should_stop()))
 			break;
 
 		spin_lock(&khugepaged_mm_lock);
-- 
2.39.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux