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 762EEC433EF for ; Fri, 15 Apr 2022 23:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356469AbiDOX1C (ORCPT ); Fri, 15 Apr 2022 19:27:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231839AbiDOX07 (ORCPT ); Fri, 15 Apr 2022 19:26:59 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B3C22708 for ; Fri, 15 Apr 2022 16:24:27 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-2eafabbc80aso94884137b3.11 for ; Fri, 15 Apr 2022 16:24:27 -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=Cxt2uEcbDsT/cVcss+Oed++7USVk9BRG70PSqUV2sRA=; b=o9JWs2FyVHQ7Re6QVoMehMOzM6wRTq38a1AwTqjPdmACMonccCQgZUIu3hGbqNbJGx wG6Ywd7yrWJXfrT0+MC5+2bGIlqnVT5IHEfmuOTHvVf3hLqCXV4HwsD4O6rPbjnXUjRR 85H1+co/bpMt/xuuPrqSMl4Vq6wIMi0oV2WPxV0DWonzWkDVQwCV1gB3W7mm1pQVkmVS 6wLhUCv9gVewt3r87ikTO6Kik6eHhGJ8GRUds3XTucwSHGoDk4tmpVJCdHvpEF3etP0m ZHTzPxj9tBWm+We0AMjhwDY/56vmdkPbHw2Us46AGziCJkmE0qntu2e9QCTthSKSy3jw l8Vw== 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=Cxt2uEcbDsT/cVcss+Oed++7USVk9BRG70PSqUV2sRA=; b=f8cyC83T/933MGLT47NGj5TCvTnwyNerl7i8lp3S/j3NR4TfJwXWclcYZYvNAl2sgl Q8EgkZcTUSlCyBJQN2BajdGg803Lbega0wDpOnnZOtUrux9JV9BJ7Xsfj3J6i5UpKftD nzhwdTuRjzmhz4P5Zw9WplHqGKcCXacJfmAnrkikJXsoVyM0eyOYFC4+bcux/VHaynyD SCCcQ7PPWxKGd3jz8i23DtRgz5yGoO85qVdIq+HuzS+/jcKRwe8u3+ViUWYPVCQRuxiU 7x427Sy5LvkM0byaMwxXz/s7MTrDWskMpLybiSrKcB4/eAGmgRkrlth/NTjP3gWeQPVh R5fg== X-Gm-Message-State: AOAM532nZ7RBSpJKuKFgPtC7tEmRxtcYgwMJrjkkUZiel0/boxPlqwSq qPPD2RsoqVOaKFx+upm7+PG/j5mcyv75MDDtIFdqIw== X-Google-Smtp-Source: ABdhPJymSM8rAJqKJqvQgojVsV7KVaqMaDPb49Py0OCI7oQ+4nknrXkY/Mk29hxHQ9wU+twofcB4rQhyzFE0gK9E3ow= X-Received: by 2002:a81:78c9:0:b0:2eb:469b:e788 with SMTP id t192-20020a8178c9000000b002eb469be788mr1158786ywc.34.1650065066420; Fri, 15 Apr 2022 16:24:26 -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: Jesse Barnes Date: Fri, 15 Apr 2022 16:24:14 -0700 Message-ID: Subject: Re: [page-reclaim] Re: [PATCH v10 08/14] mm: multi-gen LRU: support page table walks To: Linus Torvalds Cc: Yu Zhao , 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 , 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 4:04 PM Linus Torvalds wrote: > > 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. Generally agreed, and not to belabor this relatively small issue, but in some environments like cloud or managed client deployments, a crash can actually be preferable so we can get a dump, reboot the machine, and get things going again for the application or user, then debug offline. So having the flexibility to do that in those situations is helpful. And there, a full crash dump is better than just a log report with the WARN info, since debugging may be easier with all the kernel memory. Jesse 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 3EA68C433F5 for ; Fri, 15 Apr 2022 23:25:43 +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=uPbyy/gzRmQuxstYx2VvHvfNsg9RLuXY3Z9Y17gIUHs=; b=nF7Q2NMN4Set6L 9SUxxNweAGwAY344yMqS1xME7noi9vIwM04X9KPlfkOwP+YO8JBluAofgwRl6FI4cWnBdLdApXiBC zRv1QZSauJweLAiRil3F8SfKdLiyNzcR/uMmTVOEXu44qgLEwrKQ8c3z0voLApKfeqEbXCmFEf6nX 923CwUPLTxB2CdOqjqxLmToR8Yc1qdge9zi0SRSoMue4/TEZWAzPF3Odw9BxZNqC/ReKjXR70oUVl uG9HMO7hFr/6bbZG1dk8DwqrR77cH10fdt5Ug9HMokygTE26rzOHchxy/pwIBYNFRLIX1tXqj3AXx pBlnGqZVH20uLcG1+RAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfVIo-00BgEn-6n; Fri, 15 Apr 2022 23:24:34 +0000 Received: from mail-yw1-x1136.google.com ([2607:f8b0:4864:20::1136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfVIl-00BgCc-Dc for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 23:24:32 +0000 Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-2eba37104a2so95934097b3.0 for ; Fri, 15 Apr 2022 16:24:27 -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=Cxt2uEcbDsT/cVcss+Oed++7USVk9BRG70PSqUV2sRA=; b=o9JWs2FyVHQ7Re6QVoMehMOzM6wRTq38a1AwTqjPdmACMonccCQgZUIu3hGbqNbJGx wG6Ywd7yrWJXfrT0+MC5+2bGIlqnVT5IHEfmuOTHvVf3hLqCXV4HwsD4O6rPbjnXUjRR 85H1+co/bpMt/xuuPrqSMl4Vq6wIMi0oV2WPxV0DWonzWkDVQwCV1gB3W7mm1pQVkmVS 6wLhUCv9gVewt3r87ikTO6Kik6eHhGJ8GRUds3XTucwSHGoDk4tmpVJCdHvpEF3etP0m ZHTzPxj9tBWm+We0AMjhwDY/56vmdkPbHw2Us46AGziCJkmE0qntu2e9QCTthSKSy3jw l8Vw== 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=Cxt2uEcbDsT/cVcss+Oed++7USVk9BRG70PSqUV2sRA=; b=KuH8Sq58ZjwyTnFVQ84BmDxRl59KUgr37o4RdSboeKrSpaSixHlyBr15HgMktRogpI M8UjZnr+KQe5Z0VpeuLNVKEj3JfVhsMFy3akqBiKMoCG3SZ01Ud4GZS/bc3xzSZQl5EL kp2BQYCQgP4/1fMisKNHCKvWgxavQRZSuCDvGYxu0SKNaWFyOUXlH0f7c+ebVwIaFy/d hTbhL2GrstDUMY29ScHS4ukPfba4Jor6ioI0Mk3ToWpDPQRG/crzdlw8w6ELffsOBMwn YbBFWE1c09FABHzw0MVVfw7NAPG1S8DIEa/sDEisGnj/OcfZ9xLqxHD2Fgj2etenN1zN R6iw== X-Gm-Message-State: AOAM5335fluALwPialjgaHH2znvq/ZpSe9CzVVlS2ryO0KG5zb/wd45T 1G6LD2zjsVGY/PW6Z0TyChloty3WbW+YZMUhLNtA1Q== X-Google-Smtp-Source: ABdhPJymSM8rAJqKJqvQgojVsV7KVaqMaDPb49Py0OCI7oQ+4nknrXkY/Mk29hxHQ9wU+twofcB4rQhyzFE0gK9E3ow= X-Received: by 2002:a81:78c9:0:b0:2eb:469b:e788 with SMTP id t192-20020a8178c9000000b002eb469be788mr1158786ywc.34.1650065066420; Fri, 15 Apr 2022 16:24:26 -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: Jesse Barnes Date: Fri, 15 Apr 2022 16:24:14 -0700 Message-ID: Subject: Re: [page-reclaim] Re: [PATCH v10 08/14] mm: multi-gen LRU: support page table walks To: Linus Torvalds Cc: Yu Zhao , 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 , 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_162431_498554_E505FD3C X-CRM114-Status: GOOD ( 24.76 ) 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 4:04 PM Linus Torvalds wrote: > > 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. Generally agreed, and not to belabor this relatively small issue, but in some environments like cloud or managed client deployments, a crash can actually be preferable so we can get a dump, reboot the machine, and get things going again for the application or user, then debug offline. So having the flexibility to do that in those situations is helpful. And there, a full crash dump is better than just a log report with the WARN info, since debugging may be easier with all the kernel memory. Jesse _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel