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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7103FC25B0E for ; Fri, 19 Aug 2022 06:44:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346331AbiHSGo1 (ORCPT ); Fri, 19 Aug 2022 02:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbiHSGoZ (ORCPT ); Fri, 19 Aug 2022 02:44:25 -0400 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6FC5DB057 for ; Thu, 18 Aug 2022 23:44:22 -0700 (PDT) Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1660891460; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wuABtezSM3SWmKjuAZiIEnIo/HBbdIYMcf6ubm4bNLY=; b=hhwxA7RO2eTsAxvYPeOzFP9gzQ6rqHaz/OS4uZNTTdXrWbp2eTjLQpXXi3eX16G8Qn3AQD OD4bklQH3NoHBlmRAsOB70CbvmjLf5mktCNvy7UcF1y9BRHIIuM5X8hd17kx0UTc4zNV2t b0cPpYIcbfXXWmIcUZBGnI067MxxjGk= MIME-Version: 1.0 Subject: Re: [PATCH] mm: hugetlb: simplify per-node sysfs creation and removal X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: Date: Fri, 19 Aug 2022 14:44:13 +0800 Cc: Muchun Song , rafael@kernel.org, Mike Kravetz , Andrew Morton , Oscar Salvador , David Hildenbrand , linux-kernel@vger.kernel.org, Linux MM , lee.schermerhorn@hp.com Content-Transfer-Encoding: quoted-printable Message-Id: References: <20220819052137.7985-1-songmuchun@bytedance.com> To: Greg KH X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Aug 19, 2022, at 14:32, Greg KH wrote: >=20 > 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. >>=20 >> 39da08cb074c ("hugetlb: offload per node attribute registrations") >=20 > Any specific reason why you did not cc: the original author of this > commit, or anyone else on the patch? OK. Cc Lee Schermerhorn. >=20 >> 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. >=20 > I do not think we had memory hotplug notifier back in 2009 when this > commit was first written. Maybe not. Commit 39da08cb074c is merger in 2009. However, hotplug = notifier mechanism is merged in 2006. The document is updated in 2007 (see commit = 10020ca246c5). >=20 > 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. I really did the test (through a VM), it works properly. Thanks. >=20 > thanks, >=20 > greg k-h