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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44160C433EF for ; Fri, 15 Apr 2022 23:04:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356417AbiDOXG2 (ORCPT ); Fri, 15 Apr 2022 19:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbiDOXG0 (ORCPT ); Fri, 15 Apr 2022 19:06:26 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAF5367D3E for ; Fri, 15 Apr 2022 16:03:56 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id 11so6314901edw.0 for ; Fri, 15 Apr 2022 16:03:56 -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=qAVKxLRsro40eyI5WyIogZIUau7Btq9sf3bKjxnPBm6wJhLQHJbPBRtFb0LRGI+gVh kc3GnLTksr/iPcxO9gZiO0vJ71HEYlyBEwtaKZYitTTR97U4jINTIDKj8KFH0bs3TCGN FZJFuHfnUd3e4PaLMAF+HD6rk8k44kFWbDW0+ow4nb5xfB0keCKATswwwmkTycR3vkHH DtePK7VCQqZDRYDQuchhPdGOWvYbJggsAH1rJdDYhXHUACCtMiE6mPKZh86v3Ap4GIRt AHOZnJRj4u/W27eYA1R2+pFIlNxJcX7Mto/MA+OB3sbrOxBLiAYnbbtTMZYHNtdLHVxF OV2A== X-Gm-Message-State: AOAM531HU045wzhzIOuZwJGvF4CbiQuD4KnpCsGHCH2v+js2zGTodtBU o6wXne+zQfyPR0p1+VF/F1PoNF5FSjjJQFfERRY= X-Google-Smtp-Source: ABdhPJzbYnmnM3/OIzH3e6BXpANuHIzER9X86nsUqcSAqBaAXoQ/bW6vqReqnqA5e7tKyYA/4C9Rhg== X-Received: by 2002:a05:6402:354d:b0:41d:dfe:6a8c with SMTP id f13-20020a056402354d00b0041d0dfe6a8cmr1325067edd.286.1650063835212; Fri, 15 Apr 2022 16:03:55 -0700 (PDT) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com. [209.85.218.52]) by smtp.gmail.com with ESMTPSA id q14-20020a17090622ce00b006e898c912e5sm2074353eja.217.2022.04.15.16.03.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Apr 2022 16:03:55 -0700 (PDT) Received: by mail-ej1-f52.google.com with SMTP id g18so17438561ejc.10 for ; Fri, 15 Apr 2022 16:03:54 -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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A4B0CC433F5 for ; Fri, 15 Apr 2022 23:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LN7oZvusYYf6qoSqa5hqOhRDl4xwgBDuE0xdVzg4gdM=; b=uAr2AwoOuuFdm8 nZH6tbAyChp5idSQKgPjIyhw3E58uKGW/I0HxvR3IEXfEMRWqiNiTTyl/eHiglF7Yvsmm0mIchHhX str1CbpqYAPG5mnYOjA3sLgRWchljQATzYgUNEKsqjlNT2i4DedkuIxxwkcJ6X5dpA9CZ5k8jgG4Y jI+sl4cQOoimQDKCQaqqoPrfPBOd6MmazWl4yth9KiLC3JxowfT3lJzstHAOGh6NgcJ5vnZ4bv/LA JM4WKTmqdIXV7pxeFDYM8A0y6pLRNqtBRVW/zmO0S178MtMeQkzbb4W5bXWGW2R4qA+8ncxIQEF/E X3uR+qdhqCluX6hc3aWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfUyx-00BdyG-GH; Fri, 15 Apr 2022 23:04:03 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfUyu-00BdxW-9y for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 23:04:01 +0000 Received: by mail-lj1-x233.google.com with SMTP id bn33so10837332ljb.6 for ; Fri, 15 Apr 2022 16:03:57 -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=YUd+xpYYYeDdQ6Vhu5LheR1w4m2gjVVEPFxCiFR4acFQmoPPhQIZfZgsCZ5Rx5/dTn 81eRdFX+xFP7WnTlq3cAJfYm+Txn7dCXQ9vGyVDnaJUkFENBrw+CT/fqulDsTHUI3qNm MGytgiiPoXFKTKQA3ce4NgpwXt+5jomnOARABjuNr64ypmVnsH6skkiIMs9nJbHYFTt+ zMhOyHwaNelc9mx6DSa/kJy3V5Ai9+WF7wmCIMvhUPBrWi31VJZF5v7x5E4PvD+jwshT U7MsWpUbnizyeAY1GqsrUn8b2WgEEeoxwmUdLdt3oAwyvFaxuI/1h3CMMDTi8xGKbxSS sysg== X-Gm-Message-State: AOAM533FFecJCCoe6CYpNRygn1qjcX8ltgdjw8JMXlGPbw7w0qEMZsfT WySMuyaAEjYHSUE2tb9mT4qElR1qLokNH5GNbAE= X-Google-Smtp-Source: ABdhPJwhMVhEjHaR2z8u9BEhwV5ugGjKMHs027yyO2/Iipej5WR2c+K0sQ/wajUPfdlwSg9iCnvpeg== X-Received: by 2002:a05:651c:2109:b0:24b:6a76:bfc2 with SMTP id a9-20020a05651c210900b0024b6a76bfc2mr681571ljq.240.1650063835670; Fri, 15 Apr 2022 16:03:55 -0700 (PDT) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com. [209.85.167.44]) by smtp.gmail.com with ESMTPSA id p41-20020a05651213a900b00443fac7d6ffsm478397lfa.108.2022.04.15.16.03.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Apr 2022 16:03:55 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id k5so15935902lfg.9 for ; Fri, 15 Apr 2022 16:03:55 -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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_160400_398230_542AB015 X-CRM114-Status: GOOD ( 14.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel