From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4605E15853B for ; Sun, 14 Dec 2025 01:55:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765677339; cv=none; b=DSMJa1NEqckNTbjtYMc2G9Y1+W/MOcCtcUVE34ygqOeJJmKZDHjExDsqrl+J+dHFdndp/KA+TYx8g05PAbarwZO0VjYiYydNTSuN7cUN5cJ9Vh4/G9GAGrDXVO9pX9w/OiKf00uXq3C6H5cGmvMQZ2H13rbkQ4Xe68uEvgMu6p0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765677339; c=relaxed/simple; bh=SD5AFnK1s3i6Zq7jVNlgtYNuDwWj8sy5wtYNrQ02oIs=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=QUdYtMREri4apSwxawx2swdxkHDSDxeTadB237XeXlXX3TaWZuVH8mc9V2+5FG+ERr3I2HvdIli2UNVR5QcbB//eaI8UToLouKMw2/W3/QJ/EPUAjduzim8I01G05NjcV2yqpppoBy5PCgjWq3+gk+3zNad1wbflhJhLbJAnTiI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=i2iydhYW; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="i2iydhYW" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-2a0d06cfa93so18395ad.1 for ; Sat, 13 Dec 2025 17:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1765677337; x=1766282137; darn=vger.kernel.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=QgtwyL2IOQsaRpXQUokhvGPgbhGzCSq0MlFT6kUkMw0=; b=i2iydhYWskN3V6l0regVHRspYY4Pe5KK5GeUTcn9qy90SEzMtUGkFMI1Gd1p1ngICI nApORiNt5sf5nzdq8BI9JGw05JEboQGScWqX87VRKLY4pZbf6gUnv5GuCO5khvGwmsP5 NLm3Aln9zOvDf19RRj2GFi0+REN6p7s6q0C8OzukoXSvYHHndw4sW6C82YnqsysoPtqx ytNMEmQVA/gaQUWv7dUEnN0W0xsIS7huHUZNR/sSnUu2AUrRR5XwFN7sAArEsj3q2luT RQTklIBVo7Bw9wn5hIuGmRt2z6qb7H/ApQis3aIv3ZBImfAZafmd6aHbf+MawZbg3ldp q9dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765677337; x=1766282137; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QgtwyL2IOQsaRpXQUokhvGPgbhGzCSq0MlFT6kUkMw0=; b=iTLrxaEbFKPgRtYfr13w012y+pCm2fcfre5ktBqLctcCb6i1/Xv4sKt3DnYQXzfIRt av7/jxUDP4k6GzoNXwszY/tif9W4GoEas7J6gXJWZjTjCEp+Tzt/92ItGnSTFeEhRyl6 uoU/GY428tmOIcpPjvo4yZJG+xeBqaU/cgZaVqznSyf/gX3JsLz0wRAqbfWDX4+QVU1D VMKpsDHih0k7Yk4zbySlOSxjxPBqysxVIumLcNknw6kkBxsXvs1Cdsttn3o/+W0rSg0Z oQs0qSlQ9csUCmRYflk8uOFaG1pQ3sIvn2CFrC05YegQLJqOIqzWyzZbudDzrYi2I+Rp /+YQ== X-Forwarded-Encrypted: i=1; AJvYcCXDm71c3IhzF6yeULEniQSJFI1hd0knzGfjtSexdTg4+2+oOmUwh+6ShKO7Z9Cm+6y+HYS3MqoD8Zd/GfY=@vger.kernel.org X-Gm-Message-State: AOJu0YzLKtHh7A7LtOzd1vCEPZdHW/lq3iEKwoxxP/HI1WhUmYWSravn IYOVQqdJqAGHj+0nrqKw6JHdxnXApu0swzaMypnTPrm54kfjDsfMH9C2nv9jFNtePw== X-Gm-Gg: AY/fxX5OvxasIOSUPciXcFqVshfw7T8Wy/BYd6o1gwoOOG8tq4OPpKxeBbdbfPJo+FJ MDAs3XHiKSAhgVZRTeA7xX6hdP/LNykM9eBfK9V9Oq+rruxzZTILWJ3mGcJ0lyeepKgaCGAjFd7 xVxk8tjZ55+qpyaPT/rekILYqdgtWbToQD82g8235g4G18dPaAq/d5hu2q+OJ5IwXpxkTpYMY43 OzWERul6BBqJaEQkZQD2V2b1GRjfREWNGH2gABzLY3vQMMW48FRPKW5bo1GXYht1l9QBS02dAHE 1SFPT0dliD7o8CHi0DM9oa9XbSW/u6Z4Vd1gNO7DhF9ISClBuxFd+y5aYvwnL4AjwhqnT3xydzC QVhkkuy/dFvtIGgTMHxljbLlaBQaMmIKD7YJjIeQlsWFtlpOoq5tJYNP2Ia/tKpp1LCQo1D2QiU dhDaVagg6ObMJoaStCG3uxYxl5PifHRUuT7X5ERFlB0maHIgMLxEur14nS2Vn6kscvitOYFbO/+ PiRfeC5YNgXYnCoaud0bgw7XQFXkKjn6SaMyVE= X-Google-Smtp-Source: AGHT+IFM6b0dYNyFOMBGuCZFF0FeXHFTlS/LG7X4aAopwttF35Wi88j7hDAibJ75vZtBwKctVMpYJg== X-Received: by 2002:a17:902:e54f:b0:291:6858:ee60 with SMTP id d9443c01a7336-2a090572ebbmr2877745ad.4.1765677337122; Sat, 13 Dec 2025 17:55:37 -0800 (PST) Received: from [2a00:79e0:2eb0:8:ca83:e74:ec08:e2cc] ([2a00:79e0:2eb0:8:ca83:e74:ec08:e2cc]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c0c2b9d81d2sm8664281a12.26.2025.12.13.17.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Dec 2025 17:55:35 -0800 (PST) Date: Sat, 13 Dec 2025 17:55:34 -0800 (PST) From: David Rientjes To: Michal Hocko cc: Yang Xin , akpm@linux-foundation.org, shakeel.butt@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yang Xin Subject: Re: [PATCH] mm/oom_kill: add sysctl_oom_dump_stack to control kernel stack dumping on OOM In-Reply-To: Message-ID: References: <20251211202433.4495-1-redleaf@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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.