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 B2DEDC433EF for ; Fri, 15 Apr 2022 22:58:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EE6606B0072; Fri, 15 Apr 2022 18:58:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E959F6B0073; Fri, 15 Apr 2022 18:58:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5E0E6B0074; Fri, 15 Apr 2022 18:58:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id C5CDD6B0072 for ; Fri, 15 Apr 2022 18:58:15 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8236021CB2 for ; Fri, 15 Apr 2022 22:58:15 +0000 (UTC) X-FDA: 79360628550.13.273D93F Received: from mail-vs1-f46.google.com (mail-vs1-f46.google.com [209.85.217.46]) by imf27.hostedemail.com (Postfix) with ESMTP id F1B734000A for ; Fri, 15 Apr 2022 22:58:14 +0000 (UTC) Received: by mail-vs1-f46.google.com with SMTP id z139so2647920vsz.0 for ; Fri, 15 Apr 2022 15:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A+56kF8Lrin39J5VdgWnd4/aOUjS2DtusSM12wLozqw=; b=UZF+A66HZGnZJZ61lTOtqW6g2I7YTVdbyQcNB+evGKbXCRVZz62v/EwsKOIzp19zBB 59rP6ewO/3sygS2xCMotjevd9M8r3znfqKm/4bgOn9fX5Z8fVJx5lOA4j1US7s0aIHl5 /VtYuyVHER/ytM7ZGizJ/r5kgT/co3s6JzRUMqpTNFKyNfQN3hEwrDzUPGGJfUwgp1sp aFryI9eCSPcud7ziWsN3knb9cLSCgeLaAdLiVqqKjSMwuFmKCqXh/wbxQdH0xhWBZipj NEys5URXcr/aYhEiaU9NSXuTQoXCn5bbR1TWWP4qtJUwTlyMqz53GuG85W6cXTkubUnc JUMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=A+56kF8Lrin39J5VdgWnd4/aOUjS2DtusSM12wLozqw=; b=TWwAgD8VMLzW3f1ugz9pU0FQR8Mep6Xh23uM+4e53NCIOtXHV1xq6KA/3u1lIXzTnl +2or9WVaLcT56FrEETPRzDjt8EMbpZKl/fse+ajYroS4rn7fy1iy6dU9DhIFsqUfP82M YV6D6e3PW6KmmcnfkdIIEF3HwIRzSfepL2s4be0YIektOQdxypSZjbkNoTqo43vxfLtL IXt/Rq3iynQ4WStN+Uj83GrAnJPBXOZrV7sFDqK7H4O3a9NXmdKOwzP3VYVwXHCUqJ7z Ww61d7NadtRt0vylBgDf94x6p8U9rLiw5qR101wCZelC0QYwqoWqg6Ycgr01IHfLc8eC qJdA== X-Gm-Message-State: AOAM530bjmW9NAoj3L+qB7qoEXrb8s9DUjVOlv9SV1zYLBIm00bBcKSA 58HSEBd2CBDbG3l9KqqqXWyyXva9f5WzgNUW7PR5WA== X-Google-Smtp-Source: ABdhPJwWAmqYmdT8dsz6M7ZpU7MuJkcW11EpUOZD7VbT85AzKxPPMX2jjcOCdoHQ63DJsfg6SUOF9gF2pR4cTTl/WTA= X-Received: by 2002:a05:6102:5cc:b0:320:9bd2:3823 with SMTP id v12-20020a05610205cc00b003209bd23823mr332654vsf.81.1650063493942; Fri, 15 Apr 2022 15:58:13 -0700 (PDT) MIME-Version: 1.0 References: <20220407031525.2368067-1-yuzhao@google.com> <20220407031525.2368067-9-yuzhao@google.com> <20220411191621.0378467ad99ebc822d5ad005@linux-foundation.org> <20220414185654.e7150bcbe859e0dd4b9c61af@linux-foundation.org> <20220415121521.764a88dda55ae8c676ad26b0@linux-foundation.org> <20220415143220.cc37b0b0a368ed2bf2a821f8@linux-foundation.org> In-Reply-To: From: Yu Zhao Date: Fri, 15 Apr 2022 16:57:37 -0600 Message-ID: Subject: Re: [PATCH v10 08/14] mm: multi-gen LRU: support page table walks To: Linus Torvalds Cc: Andrew Morton , Justin Forbes , Stephen Rothwell , Linux-MM , Andi Kleen , Aneesh Kumar , Barry Song <21cnbao@gmail.com>, Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Johannes Weiner , Jonathan Corbet , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Mike Rapoport , Rik van Riel , Vlastimil Babka , Will Deacon , Ying Huang , Linux ARM , "open list:DOCUMENTATION" , linux-kernel , Kernel Page Reclaim v2 , "the arch/x86 maintainers" , Brian Geffon , Jan Alexander Steffens , Oleksandr Natalenko , Steven Barrett , Suleiman Souhlal , Daniel Byrne , Donald Carr , =?UTF-8?Q?Holger_Hoffst=C3=A4tte?= , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh , Vaibhav Jain Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=UZF+A66H; spf=pass (imf27.hostedemail.com: domain of yuzhao@google.com designates 209.85.217.46 as permitted sender) smtp.mailfrom=yuzhao@google.com; dmarc=pass (policy=reject) header.from=google.com X-Stat-Signature: wr38sku89k9seqnph5b6faxyer1cwg45 X-Rspamd-Queue-Id: F1B734000A X-Rspamd-Server: rspam04 X-Rspam-User: X-HE-Tag: 1650063494-181061 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 Fri, Apr 15, 2022 at 3:43 PM Linus Torvalds wrote: > > On Fri, Apr 15, 2022 at 2:32 PM Andrew Morton wrote: > > > > We could create a new MM-developer-only assertion. Might even call it > > MM_BUG_ON(). With compile-time enablement but perhaps not a runtime > > switch. > > .. or VM_BUG_ON() could just become a WARN_ON_ONCE(). > > Which it should be anyway - since the code has to be written to > continue after that BUG_ON() anyway. > > There is absolutely _zero_ advantage to killing the machine. If you > want to be notified about "this must not happen", then WARN_ON_ONCE() > is the right thing to use. > > BUG_ON() is basically always the wrong thing to do. Not trying to start a meta discussion, just my two cents: This is a typical trolley problem: for the greater good, do we want to inflict more pain on a small group of users running experimental kernels so that they'd come back and yell at us quicker and louder? BUG_ONs are harmful but problems that trigger them would be presummingly less penetrating to the user base; on the other hand, from my experience working with some testers (ordinary users), they ignore WARN_ON_ONCEs until the kernel crashes. I'll let Justin chime in on Fedora's take on CONFIG_DEBUG_VM. I bet it's intended to crash the kernel.