[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ilnyxm3qdk5ix75tfketinbhm6ubrkklrafbvmcwrsnjlgnh35@sjltlqp434fv>
Date: Fri, 3 Jan 2025 17:18:40 +0100
From: Michal Koutný <mkoutny@...e.com>
To: Chen Ridong <chenridong@...weicloud.com>
Cc: akpm@...ux-foundation.org, mhocko@...nel.org, hannes@...xchg.org,
yosryahmed@...gle.com, roman.gushchin@...ux.dev, shakeel.butt@...ux.dev,
muchun.song@...ux.dev, davidf@...eo.com, vbabka@...e.cz, handai.szj@...bao.com,
rientjes@...gle.com, kamezawa.hiroyu@...fujitsu.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, cgroups@...r.kernel.org, chenridong@...wei.com,
wangweiyang2@...wei.com
Subject: Re: [PATCH v3] memcg: fix soft lockup in the OOM process
Hello.
On Tue, Dec 24, 2024 at 02:52:38AM +0000, Chen Ridong <chenridong@...weicloud.com> wrote:
> A soft lockup issue was found in the product with about 56,000 tasks were
> in the OOM cgroup, it was traversing them when the soft lockup was
> triggered.
Why is this softlockup a problem?
It's lot of tasks afterall and possibly a slow console (given looking
for a victim among the comparable number didn't trigger it).
> To fix this issue, call 'cond_resched' in the 'mem_cgroup_scan_tasks'
> function per 1000 iterations. For global OOM, call
> 'touch_softlockup_watchdog' per 1000 iterations to avoid this issue.
This only hides the issue. It could be similarly fixed by simply
decreasing loglevel= ;-)
cond_resched() in the memcg case may be OK but the arbitrary touch for
global situation may hide possibly useful troubleshooting information.
(Yeah, cond_resched() won't fit inside RCU section as in other global
task iterations.)
0.02€,
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists