From: Michal Hocko <mhocko@suse.com>
To: zhongjinji <zhongjinji@honor.com>
Cc: akpm@linux-foundation.org, feng.han@honor.com,
fengbaopeng@honor.com, liam.howlett@oracle.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
liulu.liu@honor.com, lorenzo.stoakes@oracle.com,
rientjes@google.com, shakeel.butt@linux.dev, surenb@google.com,
tglx@linutronix.de, tianxiaobin@honor.com
Subject: Re: [PATCH v6 1/2] mm/oom_kill: Do not delay oom reaper when the victim is frozen
Date: Wed, 3 Sep 2025 09:00:37 +0200 [thread overview]
Message-ID: <aLfnldGMZkRkt8Z8@tiehlicka> (raw)
In-Reply-To: <20250902160129.13862-1-zhongjinji@honor.com>
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
next prev parent reply other threads:[~2025-09-03 7:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 6:55 [PATCH v6 0/2] Do not delay OOM reaper when the victim is frozen zhongjinji
2025-08-29 6:55 ` [PATCH v6 1/2] mm/oom_kill: Do not delay oom " zhongjinji
2025-08-29 9:57 ` Lorenzo Stoakes
2025-08-29 17:30 ` Liam R. Howlett
2025-08-29 23:20 ` Shakeel Butt
2025-09-01 13:17 ` zhongjinji
2025-09-01 7:25 ` Michal Hocko
2025-09-01 9:30 ` zhongjinji
2025-09-01 13:58 ` Michal Hocko
2025-09-02 16:01 ` zhongjinji
2025-09-03 7:00 ` Michal Hocko [this message]
2025-08-29 6:55 ` [PATCH v6 2/2] mm/oom_kill: The OOM reaper traverses the VMA maple tree in reverse order zhongjinji
2025-08-29 10:00 ` Lorenzo Stoakes
2025-08-29 17:31 ` Liam R. Howlett
2025-08-29 23:21 ` Shakeel Butt
2025-09-01 7:41 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aLfnldGMZkRkt8Z8@tiehlicka \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=feng.han@honor.com \
--cc=fengbaopeng@honor.com \
--cc=liam.howlett@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liulu.liu@honor.com \
--cc=lorenzo.stoakes@oracle.com \
--cc=rientjes@google.com \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=tglx@linutronix.de \
--cc=tianxiaobin@honor.com \
--cc=zhongjinji@honor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).