linux-IllusionX/drivers
Pavel Tatashin d0dc12e86b mm/memory_hotplug: optimize memory hotplug
During memory hotplugging we traverse struct pages three times:

1. memset(0) in sparse_add_one_section()
2. loop in __add_section() to set do: set_page_node(page, nid); and
   SetPageReserved(page);
3. loop in memmap_init_zone() to call __init_single_pfn()

This patch removes the first two loops, and leaves only loop 3.  All
struct pages are initialized in one place, the same as it is done during
boot.

The benefits:

 - We improve memory hotplug performance because we are not evicting the
   cache several times and also reduce loop branching overhead.

 - Remove condition from hotpath in __init_single_pfn(), that was added
   in order to fix the problem that was reported by Bharata in the above
   email thread, thus also improve performance during normal boot.

 - Make memory hotplug more similar to the boot memory initialization
   path because we zero and initialize struct pages only in one
   function.

 - Simplifies memory hotplug struct page initialization code, and thus
   enables future improvements, such as multi-threading the
   initialization of struct pages in order to improve hotplug
   performance even further on larger machines.

[pasha.tatashin@oracle.com: v5]
  Link: http://lkml.kernel.org/r/20180228030308.1116-7-pasha.tatashin@oracle.com
Link: http://lkml.kernel.org/r/20180215165920.8570-7-pasha.tatashin@oracle.com
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Steven Sistare <steven.sistare@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-04-05 21:36:25 -07:00
..
accessibility
acpi arm64 updates for 4.17 2018-04-04 16:01:43 -07:00
amba
android
ata Merge branch 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2018-04-03 17:42:25 -07:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-04-01 19:49:34 -04:00
auxdisplay
base mm/memory_hotplug: optimize memory hotplug 2018-04-05 21:36:25 -07:00
bcma
block
bluetooth Bluetooth: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for BTUSB_QCA_ROME 2018-04-01 21:43:02 +03:00
bus Staging/IIO patches for 4.17-rc1 2018-04-04 18:56:27 -07:00
cdrom
char Char/Misc patches for 4.17-rc1 2018-04-04 20:07:20 -07:00
clk
clocksource arch: remove obsolete architecture ports 2018-04-02 20:20:12 -07:00
connector
cpufreq Power management updates for 4.17-rc1 2018-04-03 10:45:39 -07:00
cpuidle cpuidle: poll_state: Avoid invoking local_clock() too often 2018-03-29 13:06:08 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-04-04 17:11:08 -07:00
dax
dca
devfreq
dio
dma
dma-buf
edac arch: remove obsolete architecture ports 2018-04-02 20:20:12 -07:00
eisa
extcon Char/Misc patches for 4.17-rc1 2018-04-04 20:07:20 -07:00
firewire
firmware Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-04-02 17:46:37 -07:00
fmc
fpga
fsi
gpio arch: remove obsolete architecture ports 2018-04-02 20:20:12 -07:00
gpu Char/Misc patches for 4.17-rc1 2018-04-04 20:07:20 -07:00
hid
hsi
hv hv: add SPDX license id to Kconfig 2018-03-28 13:24:56 +02:00
hwmon
hwspinlock
hwtracing Char/Misc patches for 4.17-rc1 2018-04-04 20:07:20 -07:00
i2c arch: remove obsolete architecture ports 2018-04-02 20:20:12 -07:00
ide LED updates for 4.17-rc1 2018-04-03 12:38:19 -07:00
idle
iio Merge 4.16-rc7 into staging-next 2018-03-28 13:33:37 +02:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-04-01 19:49:34 -04:00
input Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-04-04 14:50:29 -07:00
iommu Merge branch 'x86-dma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-04-02 17:18:45 -07:00
ipack
irqchip Staging/IIO patches for 4.17-rc1 2018-04-04 18:56:27 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-04-03 14:04:18 -07:00
leds
lightnvm
macintosh
mailbox
mcb
md dm: fix dropped return code from dm_get_bdev_for_ioctl 2018-03-29 23:31:32 -04:00
media media updates for v4.17-rc1 2018-04-03 17:16:59 -07:00
memory
memstick
message
mfd
misc Char/Misc patches for 4.17-rc1 2018-04-04 20:07:20 -07:00
mmc MMC core: 2018-04-03 12:17:25 -07:00
mtd mtd: jedec_probe: Fix crash in jedec_read_mfr() 2018-03-29 19:29:06 +02:00
mux
net Driver core patches for 4.17-rc1 2018-04-04 19:41:45 -07:00
nfc
ntb
nubus
nvdimm
nvme
nvmem Char/Misc patches for 4.17-rc1 2018-04-04 20:07:20 -07:00
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-04-03 14:04:18 -07:00
opp
oprofile oprofilefs: don't oops on allocation failure 2018-03-29 15:07:48 -04:00
parisc parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode 2018-03-27 18:52:22 +02:00
parport Char/Misc patches for 4.17-rc1 2018-04-04 20:07:20 -07:00
pci arch: remove obsolete architecture ports 2018-04-02 20:20:12 -07:00
pcmcia Power management updates for 4.17-rc1 2018-04-03 10:45:39 -07:00
perf arm64 updates for 4.17 2018-04-04 16:01:43 -07:00
phy
pinctrl Pin control bulk changes for the v4.17 kernel cycle: 2018-04-03 12:20:54 -07:00
platform USB/PHY patches for 4.17-rc1 2018-04-04 17:55:35 -07:00
pnp
power power supply and reset changes for the v4.17 series 2018-04-03 12:10:01 -07:00
powercap
pps
ps3
ptp
pwm pwm: remove pwm-bfin driver 2018-03-26 15:57:08 +02:00
rapidio
ras
regulator Merge remote-tracking branches 'regulator/topic/88pg86x', 'regulator/topic/dt', 'regulator/topic/formatting' and 'regulator/topic/gpio' into regulator-next 2018-03-28 10:33:53 +08:00
remoteproc
reset
rpmsg
rtc rtc: remove bfin driver 2018-03-26 15:56:31 +02:00
s390 Kbuild updates for v4.17 2018-04-03 15:51:22 -07:00
sbus sparc64: Properly range check DAX completion index 2018-04-01 20:07:00 -04:00
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-04-01 19:49:34 -04:00
sfi
sh
siox
slimbus
sn
soc
soundwire
spi spi: SPI updates for v4.17 2018-04-03 12:06:21 -07:00
spmi
ssb
staging Staging/IIO patches for 4.17-rc1 2018-04-04 18:56:27 -07:00
target
tc
tee
thermal
thunderbolt
tty TTY/Serial driver patches for 4.17-rc1 2018-04-04 18:43:49 -07:00
uio
usb TTY/Serial driver patches for 4.17-rc1 2018-04-04 18:43:49 -07:00
uwb
vfio
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-04-01 19:49:34 -04:00
video TTY/Serial driver patches for 4.17-rc1 2018-04-04 18:43:49 -07:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog arch: remove obsolete architecture ports 2018-04-02 20:20:12 -07:00
xen
zorro
Kconfig hwtracing: Add HW tracing support menu 2018-03-29 13:38:10 +03:00
Makefile