]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: hugetlb: simplify per-node sysfs creation and removal
authorMuchun Song <songmuchun@bytedance.com>
Fri, 19 Aug 2022 08:00:29 +0000 (16:00 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 22 Aug 2022 22:58:17 +0000 (15:58 -0700)
commit132f3eeae6d5deecfe148d6012047eafc46e8127
treed3252c35a04ac530320884b9827e8bf3a04869d3
parent6f8422066399147a1c902798c97967ba9316cddf
mm: hugetlb: simplify per-node sysfs creation and removal

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.

Link: https://lkml.kernel.org/r/20220819080029.12241-1-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Acked-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/base/node.c
include/linux/node.h
mm/hugetlb.c