linux/drivers
Ohhoon Kwon fc1f5e980a mm: sparse: pass section_nr to find_memory_block
With CONFIG_SPARSEMEM_EXTREME enabled, __section_nr() which converts
mem_section to section_nr could be costly since it iterates all section
roots to check if the given mem_section is in its range.

On the other hand, __nr_to_section() which converts section_nr to
mem_section can be done in O(1).

Let's pass section_nr instead of mem_section ptr to find_memory_block() in
order to reduce needless iterations.

Link: https://lkml.kernel.org/r/20210707150212.855-3-ohoono.kwon@samsung.com
Signed-off-by: Ohhoon Kwon <ohoono.kwon@samsung.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-09-03 09:58:14 -07:00
..
accessibility
acpi Merge branch 'acpi-pm' 2021-08-20 21:11:43 +02:00
amba
android
ata libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
atm
auxdisplay
base mm: sparse: pass section_nr to find_memory_block 2021-09-03 09:58:14 -07:00
bcma
block block-5.14-2021-08-27 2021-08-27 16:08:29 -07:00
bluetooth
bus Networking fixes for 5.14(-rc8?), including fixes from can and bpf. 2021-08-26 13:20:22 -07:00
cdrom
char
clk One hot fix for a NULL pointer deref in the Renesas usb clk driver 2021-08-29 12:52:17 -07:00
clocksource
comedi
connector
counter
cpufreq Merge branch 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2021-08-17 20:52:07 +02:00
cpuidle cpuidle: teo: Rename two local variables in teo_select() 2021-08-03 15:18:57 +02:00
crypto
cxl
dax Merge branch 'for-5.14/dax' into libnvdimm-fixes 2021-08-11 12:04:43 -07:00
dca
devfreq
dio
dma dmaengine fixes for v5.14 2021-08-06 11:08:24 -07:00
dma-buf
edac
eisa
extcon
firewire
firmware Ard says: 2021-08-15 06:38:26 -10:00
fpga
fsi
gnss
gpio gpio: tqmx86: really make IRQ optional 2021-08-02 17:17:27 +02:00
gpu drm/imx: imx-drm alignment and plane offset fixes 2021-08-27 10:49:53 +10:00
greybus
hid HID: ft260: fix device removal due to USB disconnect 2021-07-29 12:38:32 +02:00
hsi
hv
hwmon
hwspinlock
hwtracing
i2c i2c: dev: zero out array used for i2c reads from userspace 2021-08-10 22:54:10 +02:00
i3c
idle
iio iio: adc: Fix incorrect exit of for-loop 2021-07-31 14:46:05 +01:00
infiniband RDMA/rxe: Zero out index member of struct rxe_queue 2021-08-20 15:48:58 -03:00
input
interconnect Revert "interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate" 2021-08-12 09:24:39 +03:00
iommu iommu/vt-d: Fix incomplete cache flush in intel_pasid_tear_down_entry() 2021-08-18 13:15:58 +02:00
ipack ipack: tpci200: fix memory leak in the tpci200_register 2021-08-13 10:24:37 +02:00
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md block-5.14-2021-08-07 2021-08-07 10:26:21 -07:00
media media: ipu3-cio2: Drop reference on error path in cio2_bridge_connect_sensor() 2021-08-26 18:52:30 +02:00
memory
memstick
message
mfd
misc
mmc mmc: mmc_spi: replace flush_kernel_dcache_page with flush_dcache_page 2021-09-03 09:58:13 -07:00
most
mtd MTD core fixes: 2021-08-16 06:36:01 -10:00
mux
net Revert "net: really fix the build..." 2021-08-26 11:08:32 -07:00
nfc
ntb
nubus
nvdimm libnvdimm/region: Fix label activation vs errors 2021-08-11 11:54:43 -07:00
nvme
nvmem
of
opp opp: core: Check for pending links before reading required_opp pointers 2021-08-23 12:44:55 +05:30
parisc
parport
pci PCI/MSI: Skip masking MSI-X on Xen PV 2021-08-27 00:27:15 +02:00
pcmcia
perf
phy
pinctrl pinctrl: amd: Fix an issue with shutdown when system set to s0ix 2021-08-12 11:16:40 +02:00
platform platform/x86: gigabyte-wmi: add support for B450M S2H V2 2021-08-18 19:39:31 +02:00
pnp
power
powercap
pps
ps3
ptp ptp_pch: Restore dependency on PCI 2021-08-16 11:11:06 +01:00
pwm
rapidio
ras
regulator
remoteproc
reset reset: reset-zynqmp: Fixed the argument data type 2021-08-23 12:55:18 +02:00
rpmsg
rtc
s390 Networking fixes for 5.14-rc6, including fixes from netfilter, bpf, 2021-08-12 16:24:03 -10:00
sbus
scsi SCSI fixes on 20210828 2021-08-28 11:39:16 -07:00
sh
siox
slimbus slimbus: ngd: reset dma setup during runtime pm 2021-08-13 10:22:30 +02:00
soc NXP/FSL SoC driver fixes for v5.14 2021-08-16 22:42:02 +02:00
soundwire
spi spi: Fixes for v5.14 2021-08-06 11:15:02 -07:00
spmi
ssb
staging Revert "media: dvb header files: move some headers to staging" 2021-08-23 09:49:09 -07:00
target
tc
tee
thermal
thunderbolt
tty serial: 8250_pci: Avoid irq sharing for MSI(-X) interrupts. 2021-07-30 13:06:19 +02:00
uio
usb usb: gadget: u_audio: fix race condition on endpoint stop 2021-08-27 16:07:23 +02:00
vdpa virtio,vhost,vdpa: bugfixes 2021-08-16 06:16:25 -10:00
vfio
vhost vringh: Use wiov->used to check for read/write desc order 2021-08-11 06:44:24 -04:00
video
virt
virtio virtio-mem: fix sleeping in RCU read side section in virtio_mem_online_page_cb() 2021-08-27 11:39:36 -07:00
visorbus
vlynq
vme
w1
watchdog
xen xen: branch for v5.14-rc6 2021-08-14 06:31:22 -10:00
zorro
Kconfig
Makefile