[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YwAfo/y/4WqVeBZ1@monkey>
Date: Fri, 19 Aug 2022 16:41:23 -0700
From: Mike Kravetz <mike.kravetz@...cle.com>
To: Muchun Song <songmuchun@...edance.com>
Cc: gregkh@...uxfoundation.org, rafael@...nel.org,
akpm@...ux-foundation.org, osalvador@...e.de, david@...hat.com,
andi@...stfloor.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, muchun.song@...ux.dev
Subject: Re: [PATCH RESEND] mm: hugetlb: simplify per-node sysfs creation and
removal
On 08/19/22 16:00, 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")
>
> 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.
>
> Signed-off-by: Muchun Song <songmuchun@...edance.com>
> ---
Looking at commit 39da08cb074c, it mentions that other memory register/unregister
handlers use work queues. That seemed to be true at the time, but those handlers
have been rewritten or no longer exist. With a quick look, I did not find any
memory notifiers doing so today.
I certainly like decoupling node driver and hugetlb code. By no means am I an
expert in the hotplug interfaces. I could not find any issues in moving the
functionality to memory hotplug notification. FWICT, functionality should be
>
> Cc Andi per Greg.
>
> drivers/base/node.c | 139 ++-------------------------------------------------
> include/linux/node.h | 24 ++-------
> mm/hugetlb.c | 45 +++++++++++------
> 3 files changed, 36 insertions(+), 172 deletions(-)
Acked-by: Mike Kravetz <mike.kravetz@...cle.com>
--
Mike Kravetz
Powered by blists - more mailing lists