Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5629337rwd; Wed, 24 May 2023 04:50:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7BPJyo7CWHapbqz2pfjTCu9MJ/Ne5PnqlzKCMHdGeRf4nCve5sHOUHB5Mb/XDcTaHWUpjf X-Received: by 2002:a17:902:f54d:b0:1a6:45e5:a26a with SMTP id h13-20020a170902f54d00b001a645e5a26amr22454845plf.27.1684929000542; Wed, 24 May 2023 04:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684929000; cv=none; d=google.com; s=arc-20160816; b=eSDC/tVTC03SdAYCWdlCG//VbZhv39oBQDgmUTRJcQQ8NvyLucDMWeNh8p9SsFzxNy jkdbShq+vzwO4sY9BxnfGR2UH/eLQIqmab2AALtBG+CHuKLe+uCRFZGyh+7NmjcT4KS4 WNhahJO1s2JxzvIhP3mCmth0pKUXYhXy9ClS5n3DVWZUZLu0iRG785CD2mvqqr9RThQ+ GpgFakLUA5OcjGgi47oxrdspGqLuegkvtbWAs09S9XsfaUY9CiB3vokwkqGmXEYgiUKK YE+K+1Mm17T9CY36eyAoaB1cENEmDqIvAWXgNlQeBTKkYmb11oVxSoExrYYEcr6XSRYS ZURA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version:sender :dkim-signature; bh=mxFXcwp2KnfN6WfggDOxiqogMxrc5sx45bjEc2jiNEc=; b=mT6YxiA5DUiSyvtx+darHx+mYY/rHSzoNV8xjnGDBjjQmEZs/OcDjxzwwkz5jHLXRa 2rsqeBA+UWIk6qI4aYCi9uGHZWmkGle5rXj8ONPsjSPPwB3GQKdj8XaJRKe2RLI3lGGi YpDaBdCnX/MmSQQwvYT0jT1NcEa/0Npu//xqhJ9q9C8kfd605i3pE6J3SU/v/cX1973E jsCGPYCbnEU4SJ6wVs8Ipr/83WRkASXkgiVubmFdsZKkbdVz8YWXhiceU19txJRFrh9a Ue40PjW5Qq08gauRkjOway+vMcopvoWKqXC3xoGfscplSp54EECzfBR2Alra/QfbbBeo kDbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxtx.org header.s=google header.b=idOOCGtl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fedoraproject.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jc18-20020a17090325d200b001a197aa18fesi62132plb.121.2023.05.24.04.49.48; Wed, 24 May 2023 04:50:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxtx.org header.s=google header.b=idOOCGtl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fedoraproject.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229735AbjEXLpL (ORCPT + 99 others); Wed, 24 May 2023 07:45:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbjEXLpJ (ORCPT ); Wed, 24 May 2023 07:45:09 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B19718D for ; Wed, 24 May 2023 04:45:07 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2af2f4e719eso11212011fa.2 for ; Wed, 24 May 2023 04:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxtx.org; s=google; t=1684928705; x=1687520705; 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=idOOCGtl8Gvzq3fTgMOsAHaVhlMChHZ87Xxxtp2/cNpUdINRjTLanOO2xrS2Iq5xUQ scPCBhTWJnLaV4qE5V6/pzIlkEvmjIq9neZbwm8ATSEmZfBOLefJOywd/bTuMe/7vqNS ovOPX+q3Cu+sCI4xwxf/MiPef4QpT1pppPSAI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684928705; x=1687520705; 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=c2IFGFDKPXzfv6X/BWUXs0YoWyoKC+ptV1GKMqEdhVnV43q12MfNJT32B8/IaK0kJt pT72lDfM5G8BCXB867YaX/i3AspzuafsMpbga3l646khNF4NlNmy+a21o1WpU6JFL5K8 deiDKKahBdj+UDsRfdESIWRG565cO89sLAdANrG5VloiaaVAVxBRK2y1A5ixE68Z2lNd e4qDTqaL1lkC2kPxFFXMyGv3SxYTXWI9SrFKW9WeTpjhKaSLlqARlWwIQkjyZPMP7P8b XNxHYzdKMhaRy64J0+j5okAdZFJ34qx0LFvs1KTzLlLazHibH46O/jVDFCvBu6MinRYL wClw== X-Gm-Message-State: AC+VfDwlusWYCIhoLoay/Jap2AVEzA7PbkVPRfBzEDWlGQG79nsbFxEN f39QKBAYSm0uC9Q8fKJoyD+t8TfcNxPpWlDG54V33g== X-Received: by 2002:a2e:9cce:0:b0:2a8:e642:8cdb with SMTP id g14-20020a2e9cce000000b002a8e6428cdbmr5822406ljj.49.1684928705242; Wed, 24 May 2023 04:45:05 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id q4-20020a2e8744000000b002adb98fdf81sm2057499ljj.7.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) Sender: Justin Forbes Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-4f3a873476bso768086e87.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-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >