[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f2d5c2ed-b315-ee70-7d1e-b91d6d72a076@redhat.com>
Date: Wed, 27 Nov 2019 21:49:11 +0100
From: David Hildenbrand <david@...hat.com>
To: Qian Cai <cai@....pw>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...nel.org>,
Oscar Salvador <osalvador@...e.de>
Subject: Re: [PATCH v1] mm/memory_hotplug: don't check the nid in
find_(smallest|biggest)_section_pfn
On 27.11.19 20:52, David Hildenbrand wrote:
>
>
>> Am 27.11.2019 um 20:37 schrieb Qian Cai <cai@....pw>:
>>
>>
>>
>>> On Nov 27, 2019, at 2:06 PM, David Hildenbrand <david@...hat.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
Powered by blists - more mailing lists