lkml.org 
[lkml]   [2019]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1] mm/memory_hotplug: don't check the nid in find_(smallest|biggest)_section_pfn
From
Date
On 27.11.19 20:52, David Hildenbrand wrote:
>
>
>> Am 27.11.2019 um 20:37 schrieb Qian Cai <cai@lca.pw>:
>>
>> 
>>
>>> On Nov 27, 2019, at 2:06 PM, David Hildenbrand <david@redhat.com> wrote:
>>>
>>> The zone pointer is unique for every node. (in contrast to the zone index).
>>
>> I am not sure if it is worth optimizing there. The existing nid check looks quite straight-forward and cheap.
>
> I understand but strongly dislike your attitude towards code changes ;)
>

I think that came out wrong, let me rephrase:

This is not a performance optimization but a cleanup. Once you
understood how zone pointers work, you immediately see why the nid
checks are only here for legacy reasons (see "mm/memory_hotplug: we
always have a zone in find_(smallest|biggest)_section_pfn" in linux-next).

(I am a friend of cleaning up and refactoring code to make it easier to
understand, maintain and extend. I was assuming your mentality is to
rather keeping code changes minimal if there is a chance to break things
- I'm sorry if that assumption was wrong.)

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2019-11-27 21:50    [W:0.065 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site