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 23C7EC25B0E for ; Fri, 19 Aug 2022 07:00:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9841B8D0003; Fri, 19 Aug 2022 03:00:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 933618D0001; Fri, 19 Aug 2022 03:00:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7FBB98D0003; Fri, 19 Aug 2022 03:00:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 724F28D0001 for ; Fri, 19 Aug 2022 03:00:11 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 4C3AE1C5CA6 for ; Fri, 19 Aug 2022 07:00:11 +0000 (UTC) X-FDA: 79815443022.26.3D25F51 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id B7EA01400AC for ; Fri, 19 Aug 2022 07:00:09 +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 031D1616C1; Fri, 19 Aug 2022 07:00:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAEA0C433C1; Fri, 19 Aug 2022 07:00:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660892408; bh=Fomsv0BQOlfFABkgeVMy8iE6dqos9WYdeT4WeiUNgg4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K2Xm0/MEWRf62OGBVR1J8rwK1Yt1KVGW8+7vZ06cdO96N+YrZ17G8LJLAi57zN34C oVgg8hz4UWhJqRwQ2DAkemt6kjX5Gq4jhtg9WY5sUwHaLrr857XIeLVLZZ4bkXct+P u7fuMOBGJMTNT+qqjgRyvSASToQ6alU3dRRaJLKw= Date: Fri, 19 Aug 2022 09:00:05 +0200 From: Greg KH To: Muchun Song 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 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: ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b="K2Xm0/ME"; spf=pass (imf23.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660892409; a=rsa-sha256; cv=none; b=BKLdjyQ3x2+FqCk8xnCJ7p7u0lXTJdcGOOuSvJtuNus65v2unZpHd2RnAlpRjp0plXf8bP zOsMPLNtsd962vQiru5aJrZKDtaodptgz/duRWnla+Vm+Mzrs+lhzNcyoFQQ94h5eSpFqR DNwVdCNSaXUAW6q7VdKyX2KUgX5NY0k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660892409; 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=SLgq50JUjdsI6o7ImgQIhW8UgKV4QGkXmTBgJssEFdc=; b=yrv1q45rsBM35U1x6pVElfLPdxFKGt4H0vKutvT59nNvtO8HHO0Qh79M+pFDlU9sUhd0tn gsV2kIkMihBJNCzWAbjnP+K95lfLSLDfB0VfczLLa35xC8oj6wmzcjHDe6xvF/WyQFKVUV 8mslq0u1fqlgyNsPuQMj/IjHVMmsLhI= X-Rspamd-Queue-Id: B7EA01400AC Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b="K2Xm0/ME"; spf=pass (imf23.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org X-Rspamd-Server: rspam01 X-Rspam-User: X-Stat-Signature: 3n1gchi97x4o76qrxw5f48fd6j11bzjq X-HE-Tag: 1660892409-747012 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 02:44:13PM +0800, Muchun Song wrote: > > > > On Aug 19, 2022, at 14:32, Greg KH wrote: > > > > 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? > > OK. Cc Lee Schermerhorn. He can't see the patch here, so there is no context. Please resend the whole thing. You also didn't copy the people who signed off on it (i.e. Andi), any reason why? > >> 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. > > 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). > > > > > 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. How about on real hardware? On a HUGE system with real hardware? On a small system? thanks, greg k-h