Re: [PATCH 2/6] tracing, page-allocator: Add trace events foranti-fragmentation falling back to other migratetypes

From: Ingo Molnar
Date: Fri Aug 07 2009 - 04:03:47 EST



* Mel Gorman <mel@xxxxxxxxx> wrote:

> +++ b/mm/page_alloc.c
> @@ -839,6 +839,12 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype)
> start_migratetype);
>
> expand(zone, page, order, current_order, area, migratetype);
> +
> + trace_mm_page_alloc_extfrag(page, order, current_order,
> + start_migratetype, migratetype,
> + current_order < pageblock_order,
> + migratetype == start_migratetype);

This tracepoint too should be optimized some more:

- pageblock_order can be passed down verbatim instead of the
'current_order < pageblock_order': it means one comparison less
in the fast-path, plus it gives more trace information as well.

- migratetype == start_migratetype check is superfluous as both
values are already traced. This property can be added to the
TP_printk() post-processing stage instead, if the pretty-printing
is desired.

Ingo
--
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/