linux-stable/drivers
Muchun Song a4a00b451e mm: hugetlb: eliminate memory-less nodes handling
The memory-notify-based approach aims to handle meory-less nodes, however,
it just adds the complexity of code as pointed by David in thread [1]. 
The handling of memory-less nodes is introduced by commit 4faf8d950e
("hugetlb: handle memory hot-plug events").  >From its commit message, we
cannot find any necessity of handling this case.  So, we can simply
register/unregister sysfs entries in register_node/unregister_node to
simlify the code.

BTW, hotplug callback added because in hugetlb_register_all_nodes() we
register sysfs nodes only for N_MEMORY nodes, seeing commit 9b5e5d0fdc,
which said it was a preparation for handling memory-less nodes via memory
hotplug.  Since we want to remove memory hotplug, so make sure we only
register per-node sysfs for online (N_ONLINE) nodes in
hugetlb_register_all_nodes().

https://lore.kernel.org/linux-mm/60933ffc-b850-976c-78a0-0ee6e0ea9ef0@redhat.com/ [1]
Link: https://lkml.kernel.org/r/20220914072603.60293-3-songmuchun@bytedance.com
Suggested-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-10-03 14:03:15 -07:00
..
accessibility TTY / Serial driver changes for 6.0-rc1 2022-08-08 11:31:40 -07:00
acpi Merge branch 'acpi-processor' into acpi 2022-08-27 14:43:18 +02:00
amba
android binder_alloc: add missing mmap_lock calls when using the VMA 2022-08-28 14:02:44 -07:00
ata ata: libata-eh: Add missing command name 2022-08-16 05:42:51 +09:00
atm atm: idt77252: fix use-after-free bugs caused by tst_timer 2022-08-08 20:51:59 -07:00
auxdisplay
base mm: hugetlb: eliminate memory-less nodes handling 2022-10-03 14:03:15 -07:00
bcma
block zram: keep comments within 80-columns limit 2022-10-03 14:03:09 -07:00
bluetooth
bus
cdrom
char s390 updates for 5.20 merge window 2022-08-06 17:05:21 -07:00
clk The clk core gains a new set of APIs that allow drivers to both acquire clks 2022-08-04 18:40:08 -07:00
clocksource RISC-V: Add Sstc extension support 2022-08-11 14:41:52 -07:00
comedi pci-v5.20-changes 2022-08-04 19:30:35 -07:00
connector
counter
cpufreq cpufreq: check only freq_table in __resolve_freq() 2022-08-23 20:00:52 +02:00
cpuidle More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
crypto
cxl cxl/hdm: Fix skip allocations vs multiple pmem allocations 2022-08-05 16:11:38 -07:00
dax mm/demotion/dax/kmem: set node's abstract distance to MEMTIER_DEFAULT_DAX_ADISTANCE 2022-09-26 19:46:11 -07:00
dca
devfreq More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
dio
dma pci-v5.20-changes 2022-08-04 19:30:35 -07:00
dma-buf
edac powerpc updates for 6.0 2022-08-06 16:38:17 -07:00
eisa
extcon
firewire
firmware mm: remove rb tree. 2022-09-26 19:46:16 -07:00
fpga
fsi
gnss
gpio gpio: updates for v6.0-rc1 2022-08-04 18:34:05 -07:00
gpu i915: use the VMA iterator 2022-09-26 19:46:25 -07:00
greybus
hid platform-drivers-x86 for v6.0-1 2022-08-04 18:19:14 -07:00
hsi
hte
hv
hwmon hwmon: (nct6775) Fix platform driver suspend regression 2022-08-10 06:37:01 -07:00
hwspinlock
hwtracing asm-generic: updates for 6.0 2022-08-05 10:07:23 -07:00
i2c i2c: imx: Make sure to unregister adapter on remove() 2022-08-21 10:27:33 +02:00
i3c
idle
iio
infiniband RDMA: Handle the return code from dma_resv_wait_timeout() properly 2022-08-16 17:13:23 +03:00
input Input updates for 5.20 (6.0) merge window: 2022-08-11 09:23:08 -07:00
interconnect
iommu irqchip fixes for 6.0, take #1 2022-08-18 17:37:22 +02:00
ipack
irqchip irqchip fixes for 6.0, take #1 2022-08-18 17:37:22 +02:00
isdn
leds LED updates for 5.20: new driver for bcm63138, is31fl319x updates, 2022-08-08 11:36:21 -07:00
macintosh
mailbox - mtk: use rx_callback instead of cmdq_task_cb. 2022-08-08 10:19:40 -07:00
mcb
md block-6.0-2022-08-26 2022-08-26 11:05:54 -07:00
media More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
memory More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
memstick MMC core: 2022-08-04 19:41:09 -07:00
message
mfd - Core Frameworks 2022-08-06 10:25:16 -07:00
misc cxl: remove vma linked list walk 2022-09-26 19:46:20 -07:00
mmc linux-kselftest-kunit-fixes-6.0-rc3 2022-08-23 13:23:07 -07:00
most
mtd MTD core changes: 2022-08-05 14:13:45 -07:00
mux
net Including fixes from ipsec and netfilter (with one broken Fixes tag). 2022-08-25 14:03:58 -07:00
nfc nfc: pn533: Fix use-after-free bugs caused by pn532_cmd_timeout 2022-08-22 14:51:30 +01:00
ntb NTB: epf: Allow more flexibility in the memory BAR map method 2022-08-09 17:54:03 -04:00
nubus
nvdimm virtio: fatures, fixes 2022-08-12 09:50:34 -07:00
nvme block-6.0-2022-08-12 2022-08-13 13:37:36 -07:00
nvmem
of RISC-V Patches for the 5.20 Merge Window, Part 2 2022-08-12 18:39:43 -07:00
opp
parisc parisc: ccio-dma: Handle kmalloc failure in ccio_init_resources() 2022-08-22 11:09:17 +02:00
parport
pci Fix of heap data and clang warnings, support for a new Intel NTB device, 2022-08-13 14:00:45 -07:00
pcmcia
peci
perf perf: riscv legacy: fix kerneldoc comment warning 2022-08-18 14:19:26 -07:00
phy pci-v5.20-changes 2022-08-04 19:30:35 -07:00
pinctrl Pin control bulk changes for v6.0: 2022-08-10 11:01:44 -07:00
platform sound fixes for 6.0-rc2 2022-08-19 09:46:11 -07:00
pnp
power power supply and reset changes for the v6.0 series 2022-08-12 09:37:33 -07:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: Fixes for v6.0 2022-08-16 11:36:38 -07:00
remoteproc virtio: Revert "virtio: find_vqs() add arg sizes" 2022-08-16 01:40:24 -04:00
reset ARM: SoC: late updates for 6.0 2022-08-05 10:02:33 -07:00
rpmsg
rtc rtc: spear: set range max 2022-08-09 00:56:41 +02:00
s390 s390 updates for 6.0-rc2 2022-08-20 11:29:01 -07:00
sbus
scsi scsi: sd: Revert "Rework asynchronous resume support" 2022-08-22 22:45:25 -04:00
sh
siox
slimbus
soc More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
soundwire sound updates for 6.0-rc1 2022-08-06 10:19:51 -07:00
spi spi: Fixes for v6.0 2022-08-16 11:40:15 -07:00
spmi
ssb
staging
target SCSI misc on 20220813 2022-08-13 13:41:48 -07:00
tc
tee optee: remove vma linked list walk 2022-09-26 19:46:20 -07:00
thermal Merge branch 'thermal-core' 2022-08-27 15:07:58 +02:00
thunderbolt
tty TTY / Serial driver changes for 6.0-rc1 2022-08-08 11:31:40 -07:00
ufs scsi: ufs: core: Reduce the power mode change timeout 2022-08-19 21:34:36 -04:00
uio
usb TTY / Serial driver changes for 6.0-rc1 2022-08-08 11:31:40 -07:00
vdpa vdpa/mlx5: Fix possible uninitialized return value 2022-08-11 10:00:36 -04:00
vfio vfio: Move vfio.c to vfio_main.c 2022-08-08 14:33:41 -06:00
vhost virtio: fatures, fixes 2022-08-12 09:50:34 -07:00
video fbdev: fbcon: Properly revert changes when vc_resize() failed 2022-08-26 19:56:18 +02:00
virt
virtio virtio: kerneldocs fixes and enhancements 2022-08-16 01:40:24 -04:00
vlynq
w1
watchdog linux-watchdog 5.20-rc1 tag 2022-08-08 15:04:04 -07:00
xen xen: use vma_lookup() in privcmd_ioctl_mmap() 2022-09-26 19:46:16 -07:00
zorro
Kconfig
Makefile