[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <747f311e-0239-0f4a-2561-11e2a34d8ce1@redhat.com>
Date: Fri, 2 Jul 2021 19:57:13 +0200
From: David Hildenbrand <david@...hat.com>
To: Michal Hocko <mhocko@...e.com>,
Ohhoon Kwon <ohoono.kwon@...sung.com>
Cc: akpm@...ux-foundation.org, bhe@...hat.com, rppt@...ux.ibm.com,
ohkwon1043@...il.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] mm: sparse: remove __section_nr() function
On 02.07.21 14:18, Michal Hocko wrote:
> On Fri 02-07-21 18:41:32, Ohhoon Kwon wrote:
>> __section_nr() was used to convert struct mem_section * to section_nr.
>>
>> With CONFIG_SPARSEMEM_EXTREME enabled, however, __section_nr() can 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).
>>
>> The only users of __section_nr() was section_mark_present() and
>> find_memory_block().
>>
>> Since I changed both functions to use section_nr directly in the
>> preceeding patches, let's remove __section_nr() which has no users.
>>
>> Signed-off-by: Ohhoon Kwon <ohoono.kwon@...sung.com>
>
> I would go with a much shorter changelog. The function is not used
> anymore so it can be simply dropped.
> Acked-by: Michal Hocko <mhocko@...e.com>
Agreed, also avoid the use of "I" in patches.
Use something like
"As the last users of __section_nr() are gone, let's remove now unused
__section_nr()."
Reviewed-by: David Hildenbrand <david@...hat.com>
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists