[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250113194546.3de1af46fa7a668111909b63@linux-foundation.org>
Date: Mon, 13 Jan 2025 19:45:46 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Chen Ridong <chenridong@...weicloud.com>
Cc: Vlastimil Babka <vbabka@...e.cz>, mhocko@...nel.org, hannes@...xchg.org,
yosryahmed@...gle.com, roman.gushchin@...ux.dev, shakeel.butt@...ux.dev,
muchun.song@...ux.dev, davidf@...eo.com, handai.szj@...bao.com,
rientjes@...gle.com, kamezawa.hiroyu@...fujitsu.com, RCU
<rcu@...r.kernel.org>, 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
On Mon, 13 Jan 2025 14:51:55 +0800 Chen Ridong <chenridong@...weicloud.com> wrote:
>
>
> On 2025/1/6 16:45, Vlastimil Babka wrote:
> > On 12/24/24 03:52, Chen Ridong wrote:
> >> From: Chen Ridong <chenridong@...wei.com>
> >
> > +CC RCU
> >
> >> 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.
> >>
>
> ...
>
> >> @@ -430,10 +431,15 @@ static void dump_tasks(struct oom_control *oc)
> >> mem_cgroup_scan_tasks(oc->memcg, dump_task, oc);
> >> else {
> >> struct task_struct *p;
> >> + int i = 0;
> >>
> >> rcu_read_lock();
> >> - for_each_process(p)
> >> + for_each_process(p) {
> >> + /* Avoid potential softlockup warning */
> >> + if ((++i & 1023) == 0)
> >> + touch_softlockup_watchdog();
> >
> > This might suppress the soft lockup, but won't a rcu stall still be detected?
>
> Yes, rcu stall was still detected.
> For global OOM, system is likely to struggle, do we have to do some
> works to suppress RCU detete?
rcu_cpu_stall_reset()?
Powered by blists - more mailing lists