diff options
author | Ohhoon Kwon <ohoono.kwon@samsung.com> | 2021-09-02 23:56:58 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-03 18:58:14 +0200 |
commit | a1bc561bb2d3d9b944878955095f53aeba30a166 (patch) | |
tree | 279ea1c46fd6d7012a9e58de7633bcf29589d9f9 /include/linux/memory.h | |
parent | mm/bootmem_info.c: mark __init on register_page_bootmem_info_section (diff) | |
download | linux-a1bc561bb2d3d9b944878955095f53aeba30a166.tar.xz linux-a1bc561bb2d3d9b944878955095f53aeba30a166.zip |
mm: sparse: pass section_nr to section_mark_present
Patch series "mm: sparse: remove __section_nr() function", v4.
This patch (of 3):
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.
Since both callers of section_mark_present already know section_nr, let's
also pass section_nr as well as mem_section in order to reduce costly
translation.
Link: https://lkml.kernel.org/r/20210707150212.855-1-ohoono.kwon@samsung.com
Link: https://lkml.kernel.org/r/20210707150212.855-2-ohoono.kwon@samsung.com
Signed-off-by: Ohhoon Kwon <ohoono.kwon@samsung.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Michal Hocko <mhocko@suse.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>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions