Re: [PATCH v4 3/3] x86/vmemmap: Handle unpopulated sub-pmd ranges

David Hildenbrand
2021-03-05T18:27:59Z

On 04.03.21 18:08, Dave Hansen wrote:
> On 3/4/21 9:02 AM, Dave Hansen wrote:
>>> +#define PAGE_UNUSED 0xFD
>>> +/*
>>> + * The unused vmemmap range, which was not yet memset(PAGE_UNUSED) ranges
>>> + * from unused_pmd_start to next PMD_SIZE boundary.
>>> + */
>>> +static unsigned long unused_pmd_start __meminitdata;
>> This whole 'unused_pmd_start' thing was unmentioned in the changelog.
>
> One tiny suggestion: *Sometimes* for these optimizations, it's easiest
> to write the code up without it in one patch, then add the optimization
> in the next patch.
>
> It makes it 100% clear what is part of the "core" algorithm and what is
> pure optimization.
>
> I don't know if it will work here, but it might be worth taking a look.
>

For this reason the s390x part by me (see patch description) was two
separate patches. Maybe it also makes sense to split it up here.

--
Thanks,

David / dhildenb