From: Chen Ridong <chenridong@huaweicloud.com>
To: akpm@linux-foundation.org, mhocko@kernel.org, hannes@cmpxchg.org,
yosryahmed@google.com, roman.gushchin@linux.dev,
shakeel.butt@linux.dev, muchun.song@linux.dev, davidf@vimeo.com,
vbabka@suse.cz, mkoutny@suse.com, paulmck@kernel.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org, chenridong@huawei.com,
wangweiyang2@huawei.com
Subject: Re: [PATCH] mm/oom_kill: revert watchdog reset in global OOM process
Date: Wed, 12 Feb 2025 11:24:35 +0800 [thread overview]
Message-ID: <bad9a99e-a160-4f8a-a22e-d93c7a29f940@huaweicloud.com> (raw)
In-Reply-To: <20250212025707.67009-1-chenridong@huaweicloud.com>
On 2025/2/12 10:57, Chen Ridong wrote:
> From: Chen Ridong <chenridong@huawei.com>
>
> Unlike memcg OOM, which is relatively common, global OOM events are rare
> and typically indicate that the entire system is under severe memory
> pressure. The commit ade81479c7dd ("memcg: fix soft lockup in the OOM
> process") added the touch_softlockup_watchdog in the global OOM handler to
> suppess the soft lockup issues. However, while this change can suppress
> soft lockup warnings, it does not address RCU stalls, which can still be
> detected and may cause unnecessary disturbances. Simply remove the
> modification from the global OOM handler.
>
> Fixes: ade81479c7dd ("memcg: fix soft lockup in the OOM process")
> Signed-off-by: Chen Ridong <chenridong@huawei.com>
> ---
> mm/oom_kill.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 25923cfec9c6..2d8b27604ef8 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -44,7 +44,6 @@
> #include <linux/init.h>
> #include <linux/mmu_notifier.h>
> #include <linux/cred.h>
> -#include <linux/nmi.h>
>
> #include <asm/tlb.h>
> #include "internal.h"
> @@ -431,15 +430,10 @@ 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) {
> - /* Avoid potential softlockup warning */
> - if ((++i & 1023) == 0)
> - touch_softlockup_watchdog();
> + for_each_process(p)
> dump_task(p, oc);
> - }
> rcu_read_unlock();
> }
> }
Add discussion link:
https://lore.kernel.org/cgroups/0d9ea655-5c1a-4ba9-9eeb-b45d74cc68d0@huaweicloud.com/
next prev parent reply other threads:[~2025-02-12 3:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 2:57 Chen Ridong
2025-02-12 3:24 ` Chen Ridong [this message]
2025-02-12 8:57 ` Michal Hocko
2025-02-12 9:19 ` Chen Ridong
2025-02-12 9:34 ` Vlastimil Babka
2025-02-12 9:52 ` Chen Ridong
2025-02-12 11:58 ` 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=bad9a99e-a160-4f8a-a22e-d93c7a29f940@huaweicloud.com \
--to=chenridong@huaweicloud.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huawei.com \
--cc=davidf@vimeo.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=paulmck@kernel.org \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=vbabka@suse.cz \
--cc=wangweiyang2@huawei.com \
--cc=yosryahmed@google.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