Re: [PATCH 03/19] mm: compaction: Add scanned and isolated countersfor compaction

From: Rik van Riel
Date: Tue Nov 06 2012 - 12:33:13 EST


On 11/06/2012 04:14 AM, Mel Gorman wrote:
Compaction already has tracepoints to count scanned and isolated pages
but it requires that ftrace be enabled and if that information has to be
written to disk then it can be disruptive. This patch adds vmstat counters
for compaction called compact_migrate_scanned, compact_free_scanned and
compact_isolated.

With these counters, it is possible to define a basic cost model for
compaction. This approximates of how much work compaction is doing and can
be compared that with an oprofile showing TLB misses and see if the cost of
compaction is being offset by THP for example. Minimally a compaction patch
can be evaluated in terms of whether it increases or decreases cost. The
basic cost model looks like this


Signed-off-by: Mel Gorman <mgorman@xxxxxxx>

Reviewed-by: Rik van Riel <riel@xxxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/