linux/drivers/base
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
..
firmware_loader firmware_loader: fix use-after-free in firmware_fallback_sysfs 2021-07-29 17:22:15 +02:00
power PM: domains: Improve runtime PM performance state handling 2021-08-25 20:15:54 +02:00
regmap regmap: mdio: Reject invalid addresses 2021-06-14 15:00:29 +01:00
test device property: Remove some casts in property-entry-test 2021-06-23 16:37:21 -06:00
arch_numa.c arch_numa: fix common code printing of phys_addr_t 2021-02-18 23:18:04 -08:00
arch_topology.c arch_topology: Avoid use-after-free for scale_freq_data 2021-07-01 07:32:14 +05:30
attribute_container.c driver core: attribute_container: fix W=1 warnings 2021-05-14 13:37:10 +02:00
auxiliary.c driver core: auxiliary bus: Fix memory leak when driver_register() fail 2021-07-21 16:36:06 +02:00
base.h driver core: Export device_driver_attach() 2021-06-21 15:29:24 -06:00
bus.c driver core: Flow the return code from ->probe() through to sysfs bind 2021-06-21 15:29:24 -06:00
cacheinfo.c drivers core: Use sysfs_emit for shared_cpu_map_show and shared_cpu_list_show 2020-10-02 13:24:40 +02:00
class.c drivers: base: fix some kernel-doc markups 2020-11-09 18:56:49 +01:00
component.c component: Rename 'dev' to 'parent' 2021-05-27 15:49:59 +02:00
container.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
core.c PCI/MSI: Protect msi_desc::masked for multi-MSI 2021-08-10 10:59:20 +02:00
cpu.c drivers/base: Constify static attribute_group structs 2021-06-04 15:06:28 +02:00
dd.c drivers core: Fix oops when driver probe fails 2021-07-27 14:44:43 +02:00
devcoredump.c devcoredump: remove contact information 2021-06-04 15:05:44 +02:00
devres.c devres: Enable trace events 2021-06-15 17:14:36 +02:00
devtmpfs.c devtmpfs: actually reclaim some init memory 2021-03-23 14:57:35 +01:00
driver.c drivers: base: Convert to printk alias functions 2020-07-10 14:16:44 +02:00
firmware.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
hypervisor.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
init.c driver core: auxiliary bus: Fix calling stage for auxiliary bus init 2021-02-11 08:43:03 +01:00
isa.c isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
Kconfig RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
Makefile devres: Enable trace events 2021-06-15 17:14:36 +02:00
map.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
memory.c mm: sparse: pass section_nr to find_memory_block 2021-09-03 09:58:14 -07:00
module.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
node.c Driver core changes for 5.14-rc1 2021-07-05 13:51:41 -07:00
pinctrl.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
platform-msi.c platform-msi: fix kernel-doc warnings 2021-04-02 16:40:08 +02:00
platform.c drivers/base: Constify static attribute_group structs 2021-06-04 15:06:28 +02:00
property.c Driver core changes for 5.14-rc1 2021-07-05 13:51:41 -07:00
soc.c soc: fix comment for freeing soc_dev_attr 2020-12-09 19:46:31 +01:00
swnode.c software node: Handle software node injection to an existing device properly 2021-06-23 19:34:58 +02:00
syscore.c syscore: Use pm_pr_dbg() for syscore_{suspend,resume}() 2020-09-08 13:32:06 +02:00
topology.c drivers core: Miscellaneous changes for sysfs_emit 2020-10-02 13:12:07 +02:00
trace.c devres: Enable trace events 2021-06-15 17:14:36 +02:00
trace.h devres: Enable trace events 2021-06-15 17:14:36 +02:00
transport_class.c scsi: drivers: base: Propagate errors through the transport component 2020-01-15 22:55:37 -05:00