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 B1FF8C25B0E for ; Fri, 19 Aug 2022 06:33:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 385E58D0002; Fri, 19 Aug 2022 02:33:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3355D8D0001; Fri, 19 Aug 2022 02:33:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 24B3A8D0002; Fri, 19 Aug 2022 02:33:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 18D2D8D0001 for ; Fri, 19 Aug 2022 02:33:03 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id DA15E406E0 for ; Fri, 19 Aug 2022 06:33:02 +0000 (UTC) X-FDA: 79815374604.10.7E73D01 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf31.hostedemail.com (Postfix) with ESMTP id 69E5E20016 for ; Fri, 19 Aug 2022 06:33:02 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 93D5E61616; Fri, 19 Aug 2022 06:33:01 +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> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660890782; a=rsa-sha256; cv=none; b=brhPVUI4Lf7S8wTEWfLWYzAVFNi7RDm3XsU+2/ldkNPrzpgL/Y0G5V+70rk4l7MYMUCRKF jhvKHbeBjVUrWKGgUyjOd+WcK5scXlVkPSwl5DSFvAun0GCAEKmP5HXu5zhMtFrK/dUu8d 2kpvQVtjZiDhwt6DQCORAFOuFjELdno= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=s90eIGPp; dmarc=pass (policy=none) header.from=linuxfoundation.org; spf=pass (imf31.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660890782; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nZF6dlJx4yhb9ePB9zS7Io2YDoz1Ma3fTJQiKUcG1LM=; b=FVoFlQVgv8e83WkRVga1OPvaKXFTHjgZggO+67d0ML5hnlIqX43RObeDoqKJJgeWCQ8zPG SNcEN2XDEFameTWwbPqwvfONgVCSpS6yavib21HHgGYrhfe4CVRsVdnrnxASrWyttoocNG 8qhtpkUTuoUBqMZT05c6NAWpHYuiJAE= X-Rspamd-Server: rspam06 X-Rspam-User: X-Stat-Signature: npisf811jr5o743gueoe85cn5tnhj4t7 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=s90eIGPp; dmarc=pass (policy=none) header.from=linuxfoundation.org; spf=pass (imf31.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org X-Rspamd-Queue-Id: 69E5E20016 X-HE-Tag: 1660890782-150025 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, 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