Re: [PATCH 2/2] mm: compaction.c: Add/Modify direct compaction tracepoints

From: Janani Ravichandran
Date: Sun Aug 07 2016 - 08:33:02 EST



> On Aug 1, 2016, at 6:55 PM, Vlastimil Babka <vbabka@xxxxxxx> wrote:
>
>
> Yea, this tracepoint has been odd in not printing node/zone in a friendly way (it's possible to determine it from zone_start/zone_end though, so this is good in general. But instead of printing nid and zid like this, it would be nice to unify the output with the other tracepoints, e.g.:
>
> DECLARE_EVENT_CLASS(mm_compaction_suitable_template,
> [...]
> TP_printk("node=%d zone=%-8s order=%d ret=%s",
> __entry->nid,
> __print_symbolic(__entry->idx, ZONE_TYPE),

Sure, I’ll do that in v2. Thanks!

Also, I guess I should have mentioned that the tracepoint added
at the end of the compaction code wasn’t just for deriving latency information.
rc and *contended would give us the result of the compaction attempted,
which I thought would be useful.

I get that begin/end tracepoints aren’t required here, but how about having
trace_mm_compaction_try_to_compact_pages moved to the end to
include compaction status?

Janani.
>
> Thanks,
> Vlastimil