Re: [PATCH v6 10/10] mm/memory_hotplug: Cleanup __remove_pages()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Oscar Salvador <osalvador@xxxxxxx>
- Subject: Re: [PATCH v6 10/10] mm/memory_hotplug: Cleanup __remove_pages()
- From: David Hildenbrand <david@xxxxxxxxxx>
- Date: Tue, 4 Feb 2020 13:41:06 +0100
- Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
- In-reply-to: <20200204094652.GE6494@linux>
- Organization: Red Hat GmbH
- References: <20191006085646.5768-1-david@redhat.com> <20191006085646.5768-11-david@redhat.com> <20200204094652.GE6494@linux>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1
On 04.02.20 10:46, Oscar Salvador wrote:
> On Sun, Oct 06, 2019 at 10:56:46AM +0200, David Hildenbrand wrote:
>> Let's drop the basically unused section stuff and simplify.
>>
>> Also, let's use a shorter variant to calculate the number of pages to
>> the next section boundary.
>>
>> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
>> Cc: Oscar Salvador <osalvador@xxxxxxx>
>> Cc: Michal Hocko <mhocko@xxxxxxxx>
>> Cc: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>
>> Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
>> Cc: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
>> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
>
> I have to confess that it took me while to wrap around my head
> with the new min() change, but looks ok:
It's a pattern commonly used in compilers and emulators to calculate the
number of bytes to the next block/alignment. (we're missing a macro
(like we have ALIGN_UP/IS_ALIGNED) for that - but it's hard to come up
with a good name (e.g., SIZE_TO_NEXT_ALIGN) .
--
Thanks,
David / dhildenb
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]