Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1024747pxb; Fri, 15 Apr 2022 18:44:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxG0Yyxia8xEdTAONZeRdlnZpjHKY5/Om0rruRkzNoTgIgSOPZGNX+D1jRa8bwAZtgfUoME X-Received: by 2002:a65:46cf:0:b0:399:13b3:dd8b with SMTP id n15-20020a6546cf000000b0039913b3dd8bmr1274996pgr.585.1650073457267; Fri, 15 Apr 2022 18:44:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650073457; cv=none; d=google.com; s=arc-20160816; b=Quvm9MesyU4oCs+/E3+ZCv3JAq5rsPbD3EwGVxJW5C946aJsg/jSc6jmcZYjm9fAnH u0QdCjY//nZMbjZ9dVg4njpNqaLidCx6bR0wjuyEMJ3x23H2IdTz+qzunkcS3H4gbi16 OMRo1TLRw+UvPZSAFhD537MdNgpxOR5WGQRB0L6QjLyxSJXDzcz2p2z3CNYYnmUQnTcR nvA6deeIlkz8Df3NBlNoi6Qp78cmQRa91wb1AVsXqbQoNG/RrYHGaoF2n0LZJiC9Tzwg 6ACu5wUzuedlw+mlxaardFJLvbbXs/nOj08Se2wVpHPwJ4M9JdBscbsTV+qYadxhXMn4 QroA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=BNGHwLzPw+uw93lO2KJro1S3Iw0NpTPVlrTVN50ZsoU=; b=vofBEYANcT95EjdIKWJ5iHN6C/7NODmm6wuDzVxbLlHpVfqvSkeDFckUOKtsfdBTTy rKAmX5+2JIqLWbGYimlWBGMPrIlN0i4X0VzWIl5WKRLVXbUokM8d3veTw9lNnXwP0cy0 zl8PzSCcToS7Z5d5Gn8qx5cxM2j+tcwsIS7y3RF6YLZHn/lH3Bc38TznXsvi7Q/uOH6U vfpom+/MHTUMaqEjCjeRjJdweTXv4pAs3oJK/GdSgAfoHkrrEcwsyh90y9E4ILWkq2AK V6UjubRWltC2uu/hjQe2MoCDEqWvZfhpeAXeDybcOjOWsgK76gLwdW2NKm5DFzuZpB22 pYmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=JrZnPatO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s19-20020a63af53000000b003816043ee9dsi2791111pgo.146.2022.04.15.18.44.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:44:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=JrZnPatO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 92B3C12B74C; Fri, 15 Apr 2022 18:08:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237737AbiDOVe4 (ORCPT + 99 others); Fri, 15 Apr 2022 17:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230476AbiDOVez (ORCPT ); Fri, 15 Apr 2022 17:34:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09B7FAAC8B; Fri, 15 Apr 2022 14:32:24 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 9AB7062185; Fri, 15 Apr 2022 21:32:23 +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-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.