Messages in this thread | | | Subject | Re: [PATCH v1] mm/memory_hotplug: don't check the nid in find_(smallest|biggest)_section_pfn | From | David Hildenbrand <> | Date | Wed, 27 Nov 2019 21:49:11 +0100 |
| |
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
| |