Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1262409rwb; Thu, 18 Aug 2022 23:51:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR4zs94RsPr3UabMqSVove1l6NVe6aWPo6nUT014qlRVNB4xj+EwAJOyjw0231c57JpnReYk X-Received: by 2002:a17:90b:3d03:b0:1fa:c3e7:dd59 with SMTP id pt3-20020a17090b3d0300b001fac3e7dd59mr8350553pjb.11.1660891875055; Thu, 18 Aug 2022 23:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660891875; cv=none; d=google.com; s=arc-20160816; b=jIiO5tgjkpOKeIA3HAZzScUzLJWSlg60UXD3T3JIKuRG8GpCyCuR90wGCCY0nygE/k qtmSMydstrHRkGJC9B0PGHPFvFQFOstJ8NndWCdenKycvK0dp2U9Yb7V5sKdA02RpE3M 0/OtKSLwfBGRu3R+al4944ODyjMPrcVQznGSP3p1oRfuxaVFC/hbCwkBk588P3IlA4D0 6xXxzIcGkFnSFf70Af+7hayAbLAC3j3LYnDkW8M0MA2DM6/DQ5NhJLWsr5YJWsLXzywR x+BKDhGI0Rgkt4hOFNRFITnDiv9g+OYYgkjSVzNh5BmtjxUxcqLHWqRsGLKnjBAQ0lqs 28xA== 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=nZF6dlJx4yhb9ePB9zS7Io2YDoz1Ma3fTJQiKUcG1LM=; b=np3rYdHm8mKi7Bla9VcMW7P8x3hiLWIlom0GVx1RTBlVneVHfn1kNpWHCLNYfbshzQ 69BIlVC1RULnEQl68mCOjRpQLy8cQTXr7xAow4ByCUp9LFaiDgVwjlafbYM1laLaoWDq M1/4RokmLRSjhk9ZejYJGvaFWn/b9Kq8Vf5lKtGNOr/8nrGroE+EeHjk9C5AV4HY8QRr J78FgwOeR5SGToT8A57zWiPIRvIOEateQL5xSxyu5JvGV7r02P9KvIM/7w96NzjELMeT u17Z38/LHUXSV/+9YTsCB3g5HM0/k5ulQWTn+JpZOkCpuEtVVm74sylQYJHFOcP7jX8C QMqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s90eIGPp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020a17090ac58a00b001fac1b39457si4705506pjt.163.2022.08.18.23.51.04; Thu, 18 Aug 2022 23:51:15 -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=@linuxfoundation.org header.s=korg header.b=s90eIGPp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346201AbiHSGdH (ORCPT + 99 others); Fri, 19 Aug 2022 02:33:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231991AbiHSGdF (ORCPT ); Fri, 19 Aug 2022 02:33:05 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E0FDD0745 for ; Thu, 18 Aug 2022 23:33:04 -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 sin.source.kernel.org (Postfix) with ESMTPS id C7D11CE134F for ; Fri, 19 Aug 2022 06:33:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A041C433D6; Fri, 19 Aug 2022 06:33:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660890781; bh=7KnI6WEOjESTVzU0a8ICQJZFhVe3GPGSdd9HRl9UTKA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s90eIGPpVmk3+i9VQYk4sGJbRue9fzVHkoMwI4uodC9qlNrXaPMJAuUfW0CJBOVzq kjO2WXsq6gvtXKFpmJkHpAiFm4HegLWQ7IGs54VyzTpGRQVRz52SwOxyphcCmkz3Jl 8psKhyiPt5S3qJXCDWWbOHlgdSAxrMCcHpRf21GE= Date: Fri, 19 Aug 2022 08:32:58 +0200 From: Greg KH To: Muchun Song Cc: rafael@kernel.org, mike.kravetz@oracle.com, akpm@linux-foundation.org, osalvador@suse.de, david@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, muchun.song@linux.dev Subject: Re: [PATCH] mm: hugetlb: simplify per-node sysfs creation and removal Message-ID: References: <20220819052137.7985-1-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220819052137.7985-1-songmuchun@bytedance.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Fri, Aug 19, 2022 at 01:21:37PM +0800, Muchun Song wrote: > The following commit offload per-node sysfs creation and removal to a kworker and > did not say why it is needed. And it also said "I don't know that this is > absolutely required". It seems like the author was not sure as well. Since it > only complicates the code, this patch will revert the changes to simplify the code. > > 39da08cb074c ("hugetlb: offload per node attribute registrations") Any specific reason why you did not cc: the original author of this commit, or anyone else on the patch? > We could use memory hotplug notifier to do per-node sysfs creation and removal > instead of inserting those operations to node registration and unregistration. > Then, it can reduce the code coupling between node.c and hugetlb.c. Also, it can > simplify the code. I do not think we had memory hotplug notifier back in 2009 when this commit was first written. How did you test this? Did you use a HUGETLBFS system and verify that everything still works properly? You are deleting a lot of code (always nice), but making sure everything is still operating the same is a good thing. thanks, greg k-h