From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0A12C77B7A for ; Wed, 24 May 2023 11:45:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DBB8D900004; Wed, 24 May 2023 07:45:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D6B1C900003; Wed, 24 May 2023 07:45:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C340C900004; Wed, 24 May 2023 07:45:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B453F900003 for ; Wed, 24 May 2023 07:45:11 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id DA933120993 for ; Wed, 24 May 2023 11:45:07 +0000 (UTC) X-FDA: 80824967454.20.E0EB847 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by imf23.hostedemail.com (Postfix) with ESMTP id 9E555140027 for ; Wed, 24 May 2023 11:45:05 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linuxtx.org header.s=google header.b=WXCGwDhD; spf=pass (imf23.hostedemail.com: domain of jmforbes@linuxtx.org designates 209.85.208.181 as permitted sender) smtp.mailfrom=jmforbes@linuxtx.org; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=fedoraproject.org (policy=none) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684928705; a=rsa-sha256; cv=none; b=4eh+zXPW0+V+9kw7Iwnh/iYqX4gEVjz1ivlB4VBMN7uPAJ79LhzH+Ns3I4O+DArTtV6dVd OsdOfr0RPuii2bkJmxT3OAYQGUczMjncuSPBsiNIYO5f3hwJXe7uIiqWMhBQyvtGg9FLxH dURZq3JWrFKhJd1X/KyWk1aY0lKnY+8= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=linuxtx.org header.s=google header.b=WXCGwDhD; spf=pass (imf23.hostedemail.com: domain of jmforbes@linuxtx.org designates 209.85.208.181 as permitted sender) smtp.mailfrom=jmforbes@linuxtx.org; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=fedoraproject.org (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684928705; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mxFXcwp2KnfN6WfggDOxiqogMxrc5sx45bjEc2jiNEc=; b=xOgMgQ8MgYCEICkl5cnzwy7ItDSauTeevAJow4rT32P+snPC5E7kRva24nH8PNMS7a7h5D HwrnikxTBgN5VXDHCM6KpkzA5WU4WC1kmjbqwvd/kPmdW2p62+NoaJ0Iq6fAEA0MF/HT6P h4sPdvq6FfXkWrHNuXIrUV0NcPbekpY= Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2af31dc49f9so11504881fa.0 for ; Wed, 24 May 2023 04:45:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxtx.org; s=google; t=1684928703; x=1687520703; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:sender:from:to:cc:subject:date :message-id:reply-to; bh=mxFXcwp2KnfN6WfggDOxiqogMxrc5sx45bjEc2jiNEc=; b=WXCGwDhDB/75zZQXSV1LE6LRFuvm6Mi5WnsUjszhzfBSBSLAzd3yKXDQ/bNVRJFxkH d3AA6VY4Sr7fJIsmjOcW3Md03k/lmCsTcLsDcouYGRcupekn9qmzSBhWM6K+G6saFLr1 MCZkp2JFA9i2g5yTFu3bnGLs5F/M8YMAqgews= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684928703; x=1687520703; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mxFXcwp2KnfN6WfggDOxiqogMxrc5sx45bjEc2jiNEc=; b=GDmLHS2BvlaKOiKRSXfOk6EOJIfvScPVFFUXSQJYZVuk9omGKmsJcpEyoLAOOtN7gc oTJXNqDJkbQjyIrl2eFRWJJGkqfVsVY4c+lF2/DciYonLnl7H4n5KI2fYWo8zbBNi5ud BWPD7qzUYkD2i6VRXaUtHoyODcH+LKtTnfiuF3pDPDTzTOeM7iKbemryE/3Rt8+X0n2X PQg1BNf7sEc9TvuFeC/x2Ns+aR24VUdxR65T6Upo4982HNb+9hJ5Zd66kMy0aaeCT+6m +k98CVskmji8eP3YwLcV4dajG+YlrsO3oxuEdeHMIb0qRlbXQG1E4WJi5lqxiUB22Nm+ eTXA== X-Gm-Message-State: AC+VfDwI+9ZX8ge5SRSjeIk9cdHu7YhB9MSKcv1T1hH0zdvvJqMh4V1r m/VH1Qyl5ftSjl0NAQhvvYTIWAzcZRpzsc6/V5ac+Q== X-Google-Smtp-Source: ACHHUZ7+FGcYCCWLsMwkLHQsyDXxjcaNo+ZSsrua2kMpJR3X2odguzz2V4sgqEfSnxAr9RX8TtexEg== X-Received: by 2002:a2e:a40d:0:b0:2a8:bd1f:a377 with SMTP id p13-20020a2ea40d000000b002a8bd1fa377mr5805903ljn.20.1684928703454; Wed, 24 May 2023 04:45:03 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id a19-20020a2e9813000000b002a7746800d0sm2048377ljj.130.2023.05.24.04.45.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 May 2023 04:45:02 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-4f3a873476bso768085e87.1 for ; Wed, 24 May 2023 04:45:02 -0700 (PDT) X-Received: by 2002:ac2:46ef:0:b0:4f3:a556:61b6 with SMTP id q15-20020ac246ef000000b004f3a55661b6mr5236948lfo.3.1684928701827; Wed, 24 May 2023 04:45:01 -0700 (PDT) MIME-Version: 1.0 References: <53dd9df8-e88f-f466-89f9-3fa141a10267@google.com> In-Reply-To: From: Justin Forbes Date: Wed, 24 May 2023 06:44:50 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch] mm, debug: allow suppressing panic on CONFIG_DEBUG_VM checks To: David Hildenbrand Cc: Linus Torvalds , David Rientjes , Andrew Morton , Michal Hocko , Alex Shi , Johannes Weiner , Matthew Wilcox , Alexander Duyck , linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 9E555140027 X-Stat-Signature: xk4hniibisgnnfbp55imfrbmtb9nag9b X-Rspam-User: X-HE-Tag: 1684928705-275916 X-HE-Meta: U2FsdGVkX1/lUhxSaLE4IVB3yt0TDnKnekfEgKY5XWMwBG+sNKwnVdBeNUPE9PABe3jRX1zHlZrhNThCo7TaMYVhiXVS5V05na0iZP0fz8kEbER/Nxgbirvo8QdqVV2sEJR3+MLlu/zDol+1vsQa3RXFK8YejUM2NIRMFDgu8DQRp3vicXDP9Igz7DqNS8xvHU13kmVYWdsoNVBjcOoy7aYSZD43DIwTGMg3c4EYx84Eom4WWRcSzO4F84gwM8vViVpI/dBtg6G67GamYI4sAGi9ibjfBRBrjMBs5T0XczcRSvCT/q57VfdKDzrtfBMG/Jj8ikUhfu6NEmegbGxxte1vJSucQiRNLkbsSkCuQ2JEDnYEubmZ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C4XUwjC/FliworjzRairQOpFjdzmEvPQNP9zlq1Ks6uo03A7CDS1fXqfnUEtj/RYsuEY12dX7cRAzUAZFDcDuGzjvBEqAM9qsta9MmQsVzsTusa1oOpriu9okcUBKY918TFKZ6A/FrGexLX+BLHx6ipL/LAq25G1C2HgnJX9mED/t4weYSGfa9WCSdyIpuquvW5uwgCx4QZg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, May 24, 2023 at 3:42=E2=80=AFAM David Hildenbrand wrote: > > On 23.05.23 03:47, Linus Torvalds wrote: > > On Mon, May 22, 2023 at 5:52=E2=80=AFPM David Rientjes wrote: > >> > >> Right now kernel.panic_on_warn can either be 0 or 1. We can keep the > >> lowest bit to be "panic on all warnings" and then bit-1 as "panic on d= ebug > >> VM warnings." When CONFIG_DEBUG_VM is enabled, set the new bit by > >> default so there's no behavior change. > > > > So right now CONFIG_DEBUG_VM being off means that there's nothing at > > all - not just no output, but also no code generation. > > > > I don't think CONFIG_DEBUG_VM in itself should enable that bit-1 behavi= or. > > > > That may be what *you* as a VM person wants, but VM people are not > > exactly the common case. > > > > So I think we've got several cases: > > > > (a) the "don't even build it" case (CONFIG_DEBUG_VM being off) > > > > (b) the "build it, and it is a WARN_ON_ONCE()" case > > > > (c) the *normal* "panic_on_warn=3D1" case, which by default would pan= ic > > on all warnings, including any warnings from CONFIG_DEBUG_VM > > > > (d) the "VM person" case, which might not panic on normal warnings, > > but would panic on the VM warnings. > > > > and I think the use-cases are for different classes of kernel use: > > > > (a) is for people who disable debugging code until they feel it is > > needed (which I think covers a lot of kernel developers - I certainly > > personally tend to not build with debug support unless I'm chasing > > some issue down) > > > > (b) would probably be most distros - enable the warning so that the > > distro can report it, but try not to kill the machine of random people > > > > (c) would be most cloud use cases, presumably together with reboot-on= -panic > > > > (d) would be people who are actual VM developers, and basically want > > the *current* behavior of VM_BUG_ON() with a machine that stops > > > > and I think (d) is the smallest set of cases of all, but is the one > > you're personally interested in. > > Just as a side note, I stumbled yesterday over [1], which apparently > disables CONFIG_DEBUG_VM on !debug Fedora builds. > > The commit description does not contain a rational ( it's empty :) ), > and I don't know if this is just a temporary change. > > I'll CC Justin, maybe Fedora also would like to keep building with > CONFIG_DEBUG_VM, but default to WARN_ON_ONCE() instead. > > > [1] > https://gitlab.com/cki-project/kernel-ark/-/commit/ade780e10ae1fdcb575ab1= 00bf02d61eb12dd406 Do not read too much into this right now. The RHEL performance folks did a comparison of the RHEL config vs the Fedora config for 6.3 and found Fedora was considerably slower in a couple of tests. We are re-running those tests with some DEBUG configs turned off to see which is the culprit. FWIW, CONFIG_DEBUG_VM made very little difference. As we have not found the specific cause yet though, final configs have not been restored. As for my prefeernce, WARN_ON_ONCE() behavior would be much preferred. Justin > -- > Thanks, > > David / dhildenb >