lkml.org 
[lkml]   [2021]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] mm: sparse: pass section_nr to find_memory_block
From
Date
On 02.07.21 11:41, Ohhoon Kwon wrote:
> 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.
>
> Signed-off-by: Ohhoon Kwon <ohoono.kwon@samsung.com>


Reviewed-by: David Hildenbrand <david@redhat.com>

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2021-07-02 19:56    [W:1.863 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site