[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250901131752.29098-1-zhongjinji@honor.com>
Date: Mon, 1 Sep 2025 21:17:52 +0800
From: zhongjinji <zhongjinji@...or.com>
To: <shakeel.butt@...ux.dev>
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>, <mhocko@...e.com>, <rientjes@...gle.com>,
<surenb@...gle.com>, <tglx@...utronix.de>, <tianxiaobin@...or.com>,
<zhongjinji@...or.com>
Subject: Re: [PATCH v6 1/2] mm/oom_kill: Do not delay oom reaper when the victim is frozen
> > get_task_struct(tsk);
> > timer_setup(&tsk->oom_reaper_timer, wake_oom_reaper, 0);
> > - tsk->oom_reaper_timer.expires = jiffies + OOM_REAPER_DELAY;
> > + tsk->oom_reaper_timer.expires = jiffies;
> > +
> > + /*
> > + * If the task is frozen by the cgroup freezer, the delay is unnecessary
> > + * because it cannot exit until thawed. Skip the delay for frozen victims.
> > + */
> > + if (!frozen(tsk))
>
> Can you please change the above condition with the following to handle
> v2 as well?
Thank you, but I think the cgroupv2 check isn't needed, since a process frozen
by the cgroup v2 freezer won't block exit after being killed. Would it be
better to note in the comment or changelog that this change is for cgroup v1?
> if (!frozen(tsk) && !(READ_ONCE(tsk->frozen)))
>
> > + tsk->oom_reaper_timer.expires += OOM_REAPER_DELAY;
> > add_timer(&tsk->oom_reaper_timer);
> > }
> >
> > --
> > 2.17.1
> >
Powered by blists - more mailing lists