]> 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>
Fri, 26 Aug 2022 05:03:07 +0000 (22:03 -0700)
commit0b6951418d66cb67788fb33cb7dd334c57a1a311
tree595d7c0b1e7890b0733c8d05a086817fd9ddb053
parent4b1f05fd7bfc09f433eb5a9101b781bd6c9e6de9
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