Re: [PATCH 5/5] proc: export more page flags in /proc/kpageflags

From: Ingo Molnar
Date: Tue Apr 28 2009 - 05:37:43 EST



* Pekka Enberg <penberg@xxxxxxxxxxxxxx> wrote:

> > I have no idea how expensive tracepoints are but I suspect they
> > don't make too much sense for this particular scenario. After
> > all, kmemtrace is mainly interested in _allocation patterns_
> > whereas this patch seems to be more interested in "memory
> > layout" type of things.
>
> That said, I do foresee a need to be able to turn on more detailed
> tracing after you've identified problematic areas from kpageflags
> type of overview report. And for that, you almost certainly want
> kmemtrace/tracepoints style solution with pid/function/whatever
> regexp matching ftrace already provides.

yes. My point is that by having the latter, we pretty much have the
former as well!

I 'integrate' traces all the time to get summary counts. This series
of dynamic events:

allocation
page count up
page count up
page count down
page count up
page count up
page count up
page count up

integrates into: "page count is 6".

Note that "integration" can be done wholly in the kernel too,
without going to the overhead of streaming all dynamic events to
user-space, just to summarize data into counts, in-kernel. That is
what the ftrace statistics framework and various ftrace plugins are
about.

Also, it might make sense to extend the framework with a series of
'get current object state' events when tracing is turned on. A
special case of _that_ would in essence be what the /proc hack does
now - just expressed in a much more generic, and a much more usable
form.

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/