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 94414C433EF for ; Fri, 15 Apr 2022 21:32:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 92D456B0072; Fri, 15 Apr 2022 17:32:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8BAA86B0073; Fri, 15 Apr 2022 17:32:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 756D86B0074; Fri, 15 Apr 2022 17:32:27 -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 5F3D66B0072 for ; Fri, 15 Apr 2022 17:32:27 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 1A8EC2037C for ; Fri, 15 Apr 2022 21:32:27 +0000 (UTC) X-FDA: 79360412334.17.16115F2 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf25.hostedemail.com (Postfix) with ESMTP id 57429A0002 for ; Fri, 15 Apr 2022 21:32:26 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4D2C8B83096; Fri, 15 Apr 2022 21:32:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4ADA9C385A4; Fri, 15 Apr 2022 21:32:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1650058343; bh=3UWUcyacMiJlx7p1411HKtWv5JjN8giHOd5i3EG0zSU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JrZnPatO9LRi5eqCzk79CipiGJo5Y/fO7qwH9Qd+NPfbU1e/C3vo7TPs8SeoPNNBn QBs9tMWzjWV+goiaCOE99AzqZXatzAUIhtMAy03dOsjf4od9MMdhDi8q6b4cPyAcf4 KHcD5FHBDK5ACrThpIUEFXS/39sgtHveD+V3oKUk= Date: Fri, 15 Apr 2022 14:32:20 -0700 From: Andrew Morton To: Yu Zhao Cc: 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 , Linus Torvalds , 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 , Holger =?ISO-8859-1?Q?Hoffst=E4tte?= , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh , Vaibhav Jain Subject: Re: [PATCH v10 08/14] mm: multi-gen LRU: support page table walks Message-Id: <20220415143220.cc37b0b0a368ed2bf2a821f8@linux-foundation.org> In-Reply-To: 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> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: dgmfp7denpwzsddjq53m9pz5jk1jq8hj X-Rspam-User: Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=JrZnPatO; dmarc=none; spf=pass (imf25.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 57429A0002 X-HE-Tag: 1650058346-511202 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, 15 Apr 2022 14:11:32 -0600 Yu Zhao wrote: > > > > I grabbed > > https://kojipkgs.fedoraproject.org//packages/kernel/5.18.0/0.rc2.23.fc37/src/kernel-5.18.0-0.rc2.23.fc37.src.rpm > > and > > Yes, Fedora/RHEL is one concrete example of the model I mentioned > above (experimental/stable). I added Justin, the Fedora kernel > maintainer, and he can further clarify. > > If we don't want more VM_BUG_ONs, I'll remove them. But (let me > reiterate) it seems to me that just defeats the purpose of having > CONFIG_DEBUG_VM. > Well, I feel your pain. It was never expected that VM_BUG_ON() would get subverted in this fashion. 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. With nice simple semantics, please. Like "it returns void" and "if you pass an expression with side-effects then you lose". And "if you send a patch which produces warnings when CONFIG_MM_BUG_ON=n then you get to switch to windows95 for a month". Let's leave the mglru assertions in place for now and let's think about creating something more suitable, with a view to switching mglru over to that at a later time. But really, none of this addresses the core problem: *_BUG_ON() often kills the kernel. So guess what we just did? We killed the user's kernel at the exact time when we least wished to do so: when they have a bug to report to us. So the thing is self-defeating. It's much much better to WARN and to attempt to continue. This makes it much more likely that we'll get to hear about the kernel flaw.