Re: [RFC PATCH] mm/page_alloc.c: clean code by merging two functions

From: Mel Gorman
Date: Mon Sep 21 2020 - 12:05:42 EST


On Mon, Sep 21, 2020 at 03:36:07PM +0300, Mike Rapoport wrote:
> Hi,
>
> (added Mel)
>
> On Wed, Sep 16, 2020 at 01:01:18PM +0200, mateusznosek0@xxxxxxxxx wrote:
> > From: Mateusz Nosek <mateusznosek0@xxxxxxxxx>
> >
> > The 'finalise_ac' function is just 'epilogue' for 'prepare_alloc_pages'.
> > Therefore there is no need to keep them both so 'finalise_ac' content can
> > be merged into 'prepare_alloc_pages' code. It would make
> > '__alloc_pages_nodemask' cleaner when it comes to readability.
>
> These functions were split from alloc_pages_nodemask() by commit
> 9cd7555875bb ("mm, page_alloc: split alloc_pages_nodemask()"), so at the
> very least I'd add Mel to 'cc.
>

The changelog explains the intent. At the time, there was demand for a
bulk page allocator for networking support and one was prototyped
https://lore.kernel.org/lkml/20170109163518.6001-5-mgorman@xxxxxxxxxxxxxxxxxxx/
but the networking side to consume the interface was never finished.

--
Mel Gorman
SUSE Labs