[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090321155442.GB6356@elte.hu>
Date: Sat, 21 Mar 2009 16:54:42 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] perfcounters: record time running and time enabled
for each counter
* Andrew Morton <akpm@...ux-foundation.org> wrote:
> > @@ -243,6 +259,8 @@ struct perf_counter {
> >
> > struct perf_counter *parent;
> > struct list_head child_list;
> > + atomic64_t child_time_enabled;
> > + atomic64_t child_time_running;
>
> These read like booleans, but why are they atomic64_t's?
for inherited counters these values get collected back into a
'parent counter' in a lockless way - hence to not lose statistics on
SMP they need to be atomic64_t.
> > @@ -290,6 +308,8 @@ struct perf_counter_context {
> > int nr_active;
> > int is_active;
> > struct task_struct *task;
> > + u64 time_now;
> > + u64 time_lost;
> > #endif
> > };
>
> I don't have a copy of this header file handy, but from the
> snippet I see here, it doesn't look as though it is as clear and
> as understadable as we can possibly make it?
i'll post the latest perfcounters tree - it's time for that anyway.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists