Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1293358rwd; Thu, 8 Jun 2023 15:48:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7nW3MbcnvsIf5O+bXCV39dFyhvdMxrEqP2rhEO1V0gnOh6QRv5mC/fYbo2RW+1lcQtlETg X-Received: by 2002:a05:6a00:c91:b0:650:1a64:d8d3 with SMTP id a17-20020a056a000c9100b006501a64d8d3mr3926976pfv.14.1686264526052; Thu, 08 Jun 2023 15:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686264526; cv=none; d=google.com; s=arc-20160816; b=aPkR+OVj8FqVPD+6lSsfpSa7Rj5ASWEwaQkWcHJcsvBflSM2qKa6K0YGFFDgNctYug fhttIa+tpMAmVYERK1qbhmEasKYZ5SL9nccBA4lwnsuOfd5X9iIYbkZCxpzrz/m4whHf a7IymV5/1QcY0/sVccLpbHsyT5afF0do34AEFGO6MG0zHSNR4czXaCAaQQ0nzBw08mw8 ueDlfjufYuq/EDHec86MoUbkkbhdXhSeVrizBHLJPhzePl2Mv94RHokryPBvVkvZKz9T frx51cGr40lMfUc8WqsDkXgutWlMUaPntTw3TparbNs4mOVHm2V2IMxyQITWowHhV7e9 cnaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2/EUtx4ycp4mR6nPhVhDlxvnjzE+zvrfRKVHftXyUsQ=; b=pNbPZ7NEEoht72xj+6sdVnQIHiuJ7kYEfIs3aTwCEfLo0T/VjWBTMv42vXivXch7fb ScH+vnPxKSSx29QBxTnZIJkO5tdSddML3YvOGVQSHoueHdT5UwBmZJsMOHwE6SnhX0j3 l8r8nGyKBanxpNi3DV2l5mMoTMxATL8j0qdUfOim2BYa6TxO0/oC8EN0XaVvsn2IDbNg B8Wub3i8t1SjrFoil6k2HrUUYIM5e4G67BSnluF1LvxkaeHKsQbjXwDs5ZnERFFZlI3Y +MFN0X27jziNltdqFNJyXs4r86S4QEtPFktWVS6u4myxHXa7SM1XMvPdS50qkDT7uyO5 5Hzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=cZPc7zSy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r30-20020aa7989e000000b0065d39e113cfsi1428651pfl.228.2023.06.08.15.48.34; Thu, 08 Jun 2023 15:48:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=cZPc7zSy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233586AbjFHV6x (ORCPT + 99 others); Thu, 8 Jun 2023 17:58:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229798AbjFHV6w (ORCPT ); Thu, 8 Jun 2023 17:58:52 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AFE41FE9 for ; Thu, 8 Jun 2023 14:58:50 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1b038064d97so1329785ad.0 for ; Thu, 08 Jun 2023 14:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20221208.gappssmtp.com; s=20221208; t=1686261530; x=1688853530; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2/EUtx4ycp4mR6nPhVhDlxvnjzE+zvrfRKVHftXyUsQ=; b=cZPc7zSylxAT6FpIE4tHSHILj+81IHIUImhSd8x1ZEh9BfDo9ClhPAllJEIFmD3i9Z uNVf/KVDMMqXPqGfFx5jiiKabbZUnA2s0R0II2nJq5M/glD3LrAzYS+0OgWfXreFGBkC TG1jMPCIriroCZOIAcZFvO8mM0PqHw1mhENYRK2DbP44uA/FljkfwDXrum1S1yKOCh3H IJK3euKv7R22rYss/6OuXYIaivjw9MeRNiXoHKwPIYz14nw39r8LXPdbz8JzTyocMh76 McmR72bUJqRzn2Vn2N13e6tQYVYxF5qxOH2zfFW+8TZgheIgz7osiJkYCRyzn3s9PHVq cJpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686261530; x=1688853530; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2/EUtx4ycp4mR6nPhVhDlxvnjzE+zvrfRKVHftXyUsQ=; b=bhltm7H4jq8PwEbMSvZ3dWdItZNEnEa9/Z2nJSAD8caiqDDpzytrbAtM2fKsyI71G8 n7MUcmJ/64wskmDISVIrA2R3N4aDs1y2Ml/Elv43FGQkOlSxJimPXzLWqTfz7br9qR37 AD7/6xRGkf8ItV9WgW+7flmbtSDWwe8O5G2oYvEaJMtsQJLAsa0namfl1bRL2QPUvscb mDHcd5AebazeTSG2+RVdi/BfuEaAHzpOXFthIPvJ7NFa2CldaX3jR4pgsIu7fQsGQfcE g3f/ULs1uJmsSQiqv+pp4C1NtOrWqImXvHkGRCRWcRlpl3wGgsrlkC8qrz1kJziA4fQD FYiA== X-Gm-Message-State: AC+VfDyWbNXj1UVX0EfhlAyLaaIrDVfE7Cmtf/IVc9SZTTC1VbtEfd8p NII0zEFUXWfdo+0GeQfziF9LLA== X-Received: by 2002:a17:902:c952:b0:1b0:3d03:4179 with SMTP id i18-20020a170902c95200b001b03d034179mr4073208pla.6.1686261529696; Thu, 08 Jun 2023 14:58:49 -0700 (PDT) Received: from dread.disaster.area (pa49-179-79-151.pa.nsw.optusnet.com.au. [49.179.79.151]) by smtp.gmail.com with ESMTPSA id 4-20020a170902c14400b001b03d543549sm1892229plj.72.2023.06.08.14.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 14:58:49 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1q7NeY-009Rru-0V; Fri, 09 Jun 2023 07:58:46 +1000 Date: Fri, 9 Jun 2023 07:58:46 +1000 From: Dave Chinner To: Qi Zheng Cc: Kirill Tkhai , akpm@linux-foundation.org, roman.gushchin@linux.dev, vbabka@suse.cz, viro@zeniv.linux.org.uk, brauner@kernel.org, djwong@kernel.org, hughd@google.com, paulmck@kernel.org, muchun.song@linux.dev, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Qi Zheng Subject: Re: [PATCH v2 0/3] mm: Make unregistration of super_block shrinker more faster Message-ID: References: <168599103578.70911.9402374667983518835.stgit@pro.pro> <4176ef18-0125-dee8-f78a-837cb7a5c639@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4176ef18-0125-dee8-f78a-837cb7a5c639@linux.dev> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Wed, Jun 07, 2023 at 10:51:35AM +0800, Qi Zheng wrote: > From my personal point of view, I think it is worth sacrificing the > speed of unregistration alone compared to the benefits it brings > (lockless shrink, etc). Nobody is questioning whether this is a worthwhile improvement. The lockless shrinker instance iteration is definitely a good direction to move in. The problem is the -process- that has been followed has lead to a very sub-optimal result. > Of course, it would be better if there is a more perfect solution. > If you have a better idea, it might be better to post the code first for > discussion. Otherwise, I am afraid that if we just revert it, the > problem of shrinker_rwsem will continue for many years. No, a revert doesn't mean we don't want the change; a revert means the way the change was attempted has caused unexpected problems. We need to go back to the drawing board and work out a better way to do this. > And hi Dave, I know you're mad that I didn't cc you in the original > patch. No, I'm not mad at you. If I'm annoyed at anyone, it's the senior mm developers and maintainers that I'm annoyed at - not informing relevant parties about modifications to shrinker infrastructure or implementations has lead to regressions escaping out to user systems multiple times in the past. Yet here we are again.... > Sorry again. How about splitting shrinker-related codes into > the separate files? Then we can add a MAINTAINERS entry to it and add > linux-fsdevel@vger.kernel.org to this entry? So that future people > will not miss to cc fs folks. I don't think that fixes the problem, because the scope if much wider than fs-devel: look at all the different subsystems that have a shrinker. The whole kernel development process has always worked by the rule that we're changing common infrastructure, all the subsystems using that infrastructure need to be cc'd on the changes to the infrastructure they are using. Just cc'ing -fsdevel isn't enough, we've also got shrinkers in graphics driver infrastructure, *RCU*, virtio, DM, bcache and various other subsystems. And I'm betting most of them don't know that significant changes have been made to how the shrinkers work.... Cheers, Dave. -- Dave Chinner david@fromorbit.com