Re: [PATCH 08/14] mm, compaction: Abstract compaction feedback to helpers

From: Vlastimil Babka
Date: Thu Apr 28 2016 - 04:47:38 EST


On 04/20/2016 09:47 PM, Michal Hocko wrote:
From: Michal Hocko <mhocko@xxxxxxxx>

Compaction can provide a wild variation of feedback to the caller. Many
of them are implementation specific and the caller of the compaction
(especially the page allocator) shouldn't be bound to specifics of the
current implementation.

This patch abstracts the feedback into three basic types:
- compaction_made_progress - compaction was active and made some
progress.
- compaction_failed - compaction failed and further attempts to
invoke it would most probably fail and therefore it is not
worth retrying
- compaction_withdrawn - compaction wasn't invoked for an
implementation specific reasons. In the current implementation
it means that the compaction was deferred, contended or the
page scanners met too early without any progress. Retrying is
still worthwhile.

[vbabka@xxxxxxx: do not change thp back off behavior]
Signed-off-by: Michal Hocko <mhocko@xxxxxxxx>

Acked-by: Vlastimil Babka <vbabka@xxxxxxx>