lkml.org 
[lkml]   [2009]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] tracing, page-allocator: Add trace events for anti-fragmentation falling back to other migratetypes
On Fri, Aug 07, 2009 at 10:02:49AM +0200, Ingo Molnar wrote:
>
> * Mel Gorman <mel@csn.ul.ie> 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.
>

I think what you're saying that it's better to handle additional information
like this in TP_printk always. That's what I've changed both of these into
at least. I didn't even need to pass down pageblock_order because it should
be available in the post-processing context from a header.

The additional parameters are not being passed down any more and the
TP_printk looks like

TP_printk("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d",
__entry->page,
page_to_pfn(__entry->page),
__entry->alloc_order,
__entry->fallback_order,
pageblock_order,
__entry->alloc_migratetype,
__entry->fallback_migratetype,
__entry->fallback_order < pageblock_order,
__entry->alloc_migratetype == __entry->fallback_migratetype)

Is that what you meant?


--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab


\
 
 \ /
  Last update: 2009-08-07 12:59    [W:0.157 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site