lkml.org 
[lkml]   [2008]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 12/17] LTTng instrumentation - page
* Peter Zijlstra (peterz@infradead.org) wrote:
> On Tue, 2008-07-15 at 18:26 -0400, Mathieu Desnoyers wrote:
> > plain text document attachment (lttng-instrumentation-page.patch)
> > Paging activity instrumentation. Instruments page allocation/free to keep track
> > of page allocation. This does not cover hugetlb activity, which is covered by a
> > separate patch.
> >
> > Those tracepoints are used by LTTng.
> >
> > About the performance impact of tracepoints (which is comparable to markers),
> > even without immediate values optimizations, tests done by Hideo Aoki on ia64
> > show no regression. His test case was using hackbench on a kernel where
> > scheduler instrumentation (about 5 events in code scheduler code) was added.
> > See the "Tracepoints" patch header for performance result detail.
> >
> > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> > CC: Martin Bligh <mbligh@google.com>
> > CC: Masami Hiramatsu <mhiramat@redhat.com>
> > CC: 'Peter Zijlstra' <peterz@infradead.org>
> > CC: "Frank Ch. Eigler" <fche@redhat.com>
> > CC: 'Ingo Molnar' <mingo@elte.hu>
> > CC: 'Hideo AOKI' <haoki@redhat.com>
> > CC: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
> > CC: 'Steven Rostedt' <rostedt@goodmis.org>
> > CC: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
> > ---
> > include/trace/page.h | 16 ++++++++++++++++
> > mm/page_alloc.c | 6 ++++++
> > 2 files changed, 22 insertions(+)
> >
> > Index: linux-2.6-lttng/mm/page_alloc.c
> > ===================================================================
> > --- linux-2.6-lttng.orig/mm/page_alloc.c 2008-07-15 13:54:46.000000000 -0400
> > +++ linux-2.6-lttng/mm/page_alloc.c 2008-07-15 14:04:38.000000000 -0400
> > @@ -46,6 +46,7 @@
> > #include <linux/page-isolation.h>
> > #include <linux/memcontrol.h>
> > #include <linux/debugobjects.h>
> > +#include <trace/page.h>
> >
> > #include <asm/tlbflush.h>
> > #include <asm/div64.h>
> > @@ -510,6 +511,8 @@ static void __free_pages_ok(struct page
> > int i;
> > int reserved = 0;
> >
> > + trace_page_free(page, order);
> > +
> > for (i = 0 ; i < (1 << order) ; ++i)
> > reserved += free_pages_check(page + i);
> > if (reserved)
> > @@ -966,6 +969,8 @@ static void free_hot_cold_page(struct pa
> > struct per_cpu_pages *pcp;
> > unsigned long flags;
> >
> > + trace_page_free(page, 0);
> > +
> > if (PageAnon(page))
> > page->mapping = NULL;
> > if (free_pages_check(page))
> > @@ -1630,6 +1635,7 @@ nopage:
> > show_mem();
> > }
> > got_pg:
> > + trace_page_alloc(page, order);
> > return page;
> > }
> >
> > Index: linux-2.6-lttng/include/trace/page.h
> > ===================================================================
> > --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> > +++ linux-2.6-lttng/include/trace/page.h 2008-07-15 14:04:38.000000000 -0400
>
> This name seems inconsitent with your other choices.
>
> include/traec/page_alloc.h comes to mind
>

Yes, good idea, will fix.

Mathieu

> > @@ -0,0 +1,16 @@
> > +#ifndef _TRACE_PAGE_H
> > +#define _TRACE_PAGE_H
> > +
> > +#include <linux/tracepoint.h>
> > +
> > +/*
> > + * mm_page_alloc : page can be NULL.
> > + */
> > +DEFINE_TRACE(page_alloc,
> > + TPPROTO(struct page *page, unsigned int order),
> > + TPARGS(page, order));
> > +DEFINE_TRACE(page_free,
> > + TPPROTO(struct page *page, unsigned int order),
> > + TPARGS(page, order));
> > +
> > +#endif
> >
>

--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68


\
 
 \ /
  Last update: 2008-07-16 17:07    [W:0.045 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site