Re: [PATCH v17 3/9] mm: Add function __putback_isolated_page

Mel Gorman
2020-02-19T14:39:17Z

On Tue, Feb 11, 2020 at 02:46:24PM -0800, Alexander Duyck wrote:
> From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
>
> There are cases where we would benefit from avoiding having to go through
> the allocation and free cycle to return an isolated page.
>
> Examples for this might include page poisoning in which we isolate a page
> and then put it back in the free list without ever having actually
> allocated it.
>
> This will enable us to also avoid notifiers for the future free page
> reporting which will need to avoid retriggering page reporting when
> returning pages that have been reported on.
>
> Acked-by: David Hildenbrand <david@redhat.com>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>

Ok, the prior code that used post_alloc_hook to make the isolated page seem
like a normally allocated page followed by a free seems strange anyway. As
well as being expensive, isolated pages can end up on the per-cpu lists
which is probably not what is desired. I *think* what you've done is ok so

Acked-by: Mel Gorman <mgorman@techsingularity.net>

--
Mel Gorman
SUSE Labs