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 A73FCC25B0E for ; Fri, 19 Aug 2022 06:57:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 27D7D8D0002; Fri, 19 Aug 2022 02:57:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2066D8D0001; Fri, 19 Aug 2022 02:57:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A9128D0002; Fri, 19 Aug 2022 02:57:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E8E568D0001 for ; Fri, 19 Aug 2022 02:57:05 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id BD3D1A0355 for ; Fri, 19 Aug 2022 06:57:05 +0000 (UTC) X-FDA: 79815435210.05.1709C1B Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf31.hostedemail.com (Postfix) with ESMTP id 4A66C20096 for ; Fri, 19 Aug 2022 06:57:05 +0000 (UTC) Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1660892223; 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=lBNrmYPXLIF8oIJg0s80Rs9VguA7/xNAIlxn0aNwRaA=; b=uj8IRehRCxlFt3hWOSyoL+4qmy0+X4f2zuMmfMQsfF9LW5pwGRGbHb6NAwcL9wN29VqTD+ N8Wpimjow1Mg9JqR2jo6hcikZg3pvt5XK2Dn9BjlzhVs5DEEgC9zRjvDWUqFcxxf3fbC+s Ua4qfLEvSeV/e6BJugXcPENsPw3/5tw= 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:56:56 +0800 Cc: Muchun Song , rafael@kernel.org, Mike Kravetz , Andrew Morton , Oscar Salvador , David Hildenbrand , linux-kernel@vger.kernel.org, Linux MM Content-Transfer-Encoding: quoted-printable Message-Id: <0F3FE8B0-9ADB-423D-A2FE-2AF1A3A6E619@linux.dev> References: <20220819052137.7985-1-songmuchun@bytedance.com> To: Greg KH X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660892225; a=rsa-sha256; cv=none; b=Sxno23FLUrC+LYn3ZuRguBIIUuB6dnCbnWECI0pIQgr5V97jPTTyRP4qfbFxU2mDBB+J+6 v09DCUUhn88OlgYbKH9HHPWOMuAWK4z7WC9aCIf1+1IsrZczPM6HeJJlOHtIDYF4uG7pZt znOMmv7/M4AivY9NipKxEoKwrB9BE70= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=uj8IRehR; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf31.hostedemail.com: domain of muchun.song@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=muchun.song@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660892225; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lBNrmYPXLIF8oIJg0s80Rs9VguA7/xNAIlxn0aNwRaA=; b=D2iMQCiVYKTpJ/+hzB852r7O0jww3Q5jezgA9/dsok0ONzvUBnU0W/mj7NOhGet4h7a91/ KDoCv+JxB82ug4UxDOe8k/ZBe9nEzVwR5/EKnNzHuDltG2bYlKXAH1g6OCfn2E9WJWvOXa Usha8Yz2JRRjL4TYl5uEIHJyMOa6k8A= X-Stat-Signature: ffo533uqxaqcr1qeuwbxnngxj9cpfdk6 X-Rspamd-Queue-Id: 4A66C20096 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=uj8IRehR; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf31.hostedemail.com: domain of muchun.song@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=muchun.song@linux.dev X-Rspamd-Server: rspam04 X-Rspam-User: X-HE-Tag: 1660892225-659078 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 Aug 19, 2022, at 14:44, Muchun Song wrote: >=20 >=20 >=20 >> 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? >=20 > OK. Cc Lee Schermerhorn. Unluckily, I guess the email address is out of date since I just got = bounced mail (Undelivered Mail Returned to Sender). Remove lee.schermerhorn@hp.com = from the Cc list. >=20 >>=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. >=20 > 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 >>=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. >=20 > I really did the test (through a VM), it works properly. >=20 > Thanks. >=20 >>=20 >> thanks, >>=20 >> greg k-h