[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aLfnldGMZkRkt8Z8@tiehlicka>
Date: Wed, 3 Sep 2025 09:00:37 +0200
From: Michal Hocko <mhocko@...e.com>
To: zhongjinji <zhongjinji@...or.com>
Cc: akpm@...ux-foundation.org, feng.han@...or.com, fengbaopeng@...or.com,
liam.howlett@...cle.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, liulu.liu@...or.com, lorenzo.stoakes@...cle.com,
rientjes@...gle.com, shakeel.butt@...ux.dev, surenb@...gle.com,
tglx@...utronix.de, tianxiaobin@...or.com
Subject: Re: [PATCH v6 1/2] mm/oom_kill: Do not delay oom reaper when the
victim is frozen
On Wed 03-09-25 00:01:29, zhongjinji wrote:
[...]
> @@ -772,12 +773,18 @@ static void mark_oom_victim(struct task_struct *tsk)
> mmgrab(tsk->signal->oom_mm);
>
> /*
> - * Make sure that the task is woken up from uninterruptible sleep
> + * Make sure that the process is woken up from uninterruptible sleep
> * if it is frozen because OOM killer wouldn't be able to free
> * any memory and livelock. freezing_slow_path will tell the freezer
> - * that TIF_MEMDIE tasks should be ignored.
> + * that TIF_MEMDIE thread should be ignored.
> */
> - __thaw_task(tsk);
> + rcu_read_lock();
> + for_each_thread(tsk, t) {
> + set_tsk_thread_flag(t, TIF_MEMDIE);
> + __thaw_task(t);
> + }
> + rcu_read_unlock();
> +
I would prefer if we had thaw_process() rather than open code it here.
But the implementation matches what I would expect it to do.
> atomic_inc(&oom_victims);
> cred = get_task_cred(tsk);
> trace_mark_victim(tsk, cred->uid.val);
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists