linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Mark the OOM reaper thread as freezable
@ 2021-09-18 23:39 Sultan Alsawaf
  2021-09-19 22:40 ` Andrew Morton
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Sultan Alsawaf @ 2021-09-18 23:39 UTC (permalink / raw)
  Cc: Sultan Alsawaf, Andrew Morton, Michal Hocko, David Rientjes,
	Mel Gorman, linux-mm, linux-kernel

From: Sultan Alsawaf <sultan@kerneltoast.com>

The OOM reaper thread uses wait_event_freezable() without actually being
marked as freezable. Fix it by adding a set_freezable() call.

Fixes: aac453635549 ("mm, oom: introduce oom reaper")
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
---
 mm/oom_kill.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 831340e7ad8b..46a742b57735 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -641,6 +641,8 @@ static void oom_reap_task(struct task_struct *tsk)
 
 static int oom_reaper(void *unused)
 {
+	set_freezable();
+
 	while (true) {
 		struct task_struct *tsk = NULL;
 
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-09-21 16:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18 23:39 [PATCH] mm: Mark the OOM reaper thread as freezable Sultan Alsawaf
2021-09-19 22:40 ` Andrew Morton
2021-09-20 12:40 ` Michal Hocko
2021-09-20 15:55   ` Sultan Alsawaf
2021-09-20 17:34     ` Michal Hocko
2021-09-20 19:16       ` Sultan Alsawaf
2021-09-20 20:30         ` Michal Hocko
2021-09-20 22:29           ` Sultan Alsawaf
2021-09-21  7:50             ` Michal Hocko
2021-09-21 10:48 ` Michal Hocko
2021-09-21 16:57 ` [PATCH v2] " Sultan Alsawaf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).