From: David Rientjes <rientjes@google.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Yang Xin <yx.0xffff@gmail.com>,
akpm@linux-foundation.org, shakeel.butt@linux.dev,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Yang Xin <redleaf@linux.alibaba.com>
Subject: Re: [PATCH] mm/oom_kill: add sysctl_oom_dump_stack to control kernel stack dumping on OOM
Date: Sat, 13 Dec 2025 17:55:34 -0800 (PST) [thread overview]
Message-ID: <bf31a8f0-4e33-15bc-d3d5-6c81aae5b07a@google.com> (raw)
In-Reply-To: <aTsq4WPlrdrk6ztQ@tiehlicka>
On Thu, 11 Dec 2025, Michal Hocko wrote:
> On Fri 12-12-25 04:24:33, Yang Xin wrote:
> > Most OOM kills triggered by user-space processes produce kernel stack
> > traces that are not helpful for diagnosing the root cause. These traces
> > usually just show the page fault handler or system call entry.
> >
> > Furthermore, dump_stack() can be expensive. It often runs with
> > interrupts disabled or holds the console lock for a long time,
> > potentially causing system latencies and preventing the system from
> > responding to other events.
> >
> > This patch adds a new sysctl vm.oom_dump_stack to control this
> > behavior. Writing '0' to /proc/sys/vm/oom_dump_stack suppresses the
> > kernel stack dump during OOM kills, while '1' (the default) preserves
> > the existing behavior.
>
> While I fundamentally do not object to ways to suppress stacks traces
> for OOM I would really like to hear more what kind of overhead we are
> talking about here (stack traces are reported for tracing and other low
> latency situations) and why does this matter for as cold of a path as
> OOM is.
>
> Also we are getting way too many of these sysctls. Maybe it is time to
> look for a more customizable way to configure oom output that doesn't
> require sysctl per output feature.
>
Strongly agree, I don't think this requires yet another sysctl. It's also
global, so it will affect all oom kills including the ones where you might
find a stack to actually be really helpful to understand the issue.
prev parent reply other threads:[~2025-12-14 1:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 20:24 Yang Xin
2025-12-11 20:34 ` Michal Hocko
2025-12-14 1:55 ` David Rientjes [this message]
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=bf31a8f0-4e33-15bc-d3d5-6c81aae5b07a@google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=redleaf@linux.alibaba.com \
--cc=shakeel.butt@linux.dev \
--cc=yx.0xffff@gmail.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