linux/arch
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
..
alpha libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
arc ARC: fp: set FPU_STATUS.FWE to enable FPU_STATUS update on context switch 2021-08-03 18:58:33 -07:00
arm mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
arm64 arm64 fix for 5.14 2021-08-26 11:26:00 -07:00
csky mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
h8300 libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
hexagon Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
ia64 ia64: make num_rsvd_regions static 2021-09-03 09:58:09 -07:00
m68k libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
microblaze Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
mips mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
nds32 mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
nios2 Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
openrisc Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
parisc mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
powerpc mm: sparse: pass section_nr to find_memory_block 2021-09-03 09:58:14 -07:00
riscv RISC-V Fixes for 5.14-rc8 (or 5.14) 2021-08-27 11:04:57 -07:00
s390 mm/gup: remove try_get_page(), call try_get_compound_head() directly 2021-09-03 09:58:11 -07:00
sh mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
sparc Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) 2021-07-30 16:01:36 -07:00
um Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
x86 memcg: enable accounting for ldt_struct objects 2021-09-03 09:58:13 -07:00
xtensa libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
.gitignore
Kconfig Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR 2021-06-22 11:07:18 -07:00