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 6AA9EC433EF for ; Fri, 15 Apr 2022 23:09:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A46DB6B0072; Fri, 15 Apr 2022 19:09:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9CF166B0073; Fri, 15 Apr 2022 19:09:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 820D76B0074; Fri, 15 Apr 2022 19:09:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 6FD556B0072 for ; Fri, 15 Apr 2022 19:09:22 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 4D50323B0D for ; Fri, 15 Apr 2022 23:09:22 +0000 (UTC) X-FDA: 79360656564.07.B3A799D Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by imf21.hostedemail.com (Postfix) with ESMTP id A06781C0002 for ; Fri, 15 Apr 2022 23:09:21 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id m8so10840491ljc.7 for ; Fri, 15 Apr 2022 16:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mmeqzLMQT+kSYtEORk1VQwlIZb6II2FKZzIIoMsERjA=; b=DFSvW1LWVTiymV77lsnzL39NC77zBC5b3vG2LyDRFg75tX7jB/+k2JToy5gqlw7HJs IIT2qvLXLio9Tcg1LD3U9WtQ7/udodG+XgSQ9MMnDsc+T31mCAh5A6DsEpeeX15WWL3B ZuLUndHdgC4QOguxf+eu7BTSPyStUlOobqGVI= 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=mmeqzLMQT+kSYtEORk1VQwlIZb6II2FKZzIIoMsERjA=; b=AVCFl9+4OadXPBgf3FTZjWBJyfMSnNY1WvuWi0qnP6CT+tllmqjUoguJJv0eRNkGi7 IVZ51S7elEEkhFL8TPJoXILo3/jaGJ9/M0EeKAbWpR9wKAuc3OfrrCx3waYGBDRUog2F Hwuv4z9q6216TJpBQ9iPwWPSwHjbnwUPEFwEvVAF8+PskMU3pDk5rlddt34wO8EYw095 s5/vEp9uF0epvSVUayKTNwT489rPPBjDyL+I0B/M6ZNvH++BXL2L8NxsytVXgTnWPvf6 5DIlH4xzX9OwZ1NbyaHupCrMB758UaDXkc/vRfHo78DySngWCkgqMiUQ/tlvD9pbWFir 4D8A== X-Gm-Message-State: AOAM532a01BVokBCBNSxgPd7S9YK1fItoSWVXKnanbQqu3kGLiWqL3rl eUEOHR+fbUiQI+6natQeV6A2vSCsZdrIoT94ubo= X-Google-Smtp-Source: ABdhPJy9nF9h7s2QjhfaVJjOTpfrtQUm6dAJ34Hpap0mwC9cG+x/hXERYpoIZ0uujVwXSQB13OEGag== X-Received: by 2002:a2e:a496:0:b0:24b:56ab:2068 with SMTP id h22-20020a2ea496000000b0024b56ab2068mr708703lji.37.1650064159769; Fri, 15 Apr 2022 16:09:19 -0700 (PDT) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id q17-20020a194311000000b0046fff294fa3sm120308lfa.193.2022.04.15.16.09.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Apr 2022 16:09:19 -0700 (PDT) Received: by mail-lj1-f179.google.com with SMTP id m8so10840462ljc.7 for ; Fri, 15 Apr 2022 16:09:19 -0700 (PDT) X-Received: by 2002:a2e:b8d6:0:b0:24b:6b40:a96a with SMTP id s22-20020a2eb8d6000000b0024b6b40a96amr711923ljp.176.1650063824686; Fri, 15 Apr 2022 16:03:44 -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: Linus Torvalds Date: Fri, 15 Apr 2022 16:03:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v10 08/14] mm: multi-gen LRU: support page table walks To: Yu Zhao 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" X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: A06781C0002 X-Stat-Signature: yj4itu5ubeqogof7pnryqbcaz889oaey Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=DFSvW1LW; dmarc=none; spf=pass (imf21.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.208.175 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org X-HE-Tag: 1650064161-890235 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:58 PM Yu Zhao wrote: > > 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 don't understand your argument. First you say that VM_BUG_ON() is only for VM developers. Then you say "some testers (ordinary users) ignore WARN_ON_ONCEs until the kernel crashes". So which is it? VM developers, or ordinary users? Honestly, if a VM developer is ignoring a WARN_ON_ONCE() from the VM subsystem, I don't even know what to say. And for ordinary users, a WARN_ON_ONCE() is about a million times better, becasue: - the machine will hopefully continue working, so they can report the warning - even when they don't notice them, distros tend to have automated reporting infrastructure That's why I absolutely *DETEST* those stupid BUG_ON() cases - they will often kill the machine with nasty locks held, resulting in a completely undebuggable thing that never gets reported. Yes, you can be careful and only put BUG_ON() in places where recovery is possible. But even then, they have no actual _advantages_ over just a WARN_ON_ONCE. Linus