mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] perfcounters: record time running and time enabled for each counter
Date: Sat, 21 Mar 2009 16:54:42 +0100	[thread overview]
Message-ID: <20090321155442.GB6356@elte.hu> (raw)
In-Reply-To: <20090321055252.eb0673ea.akpm@linux-foundation.org>


* Andrew Morton <akpm@linux-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

  parent reply	other threads:[~2009-03-21 15:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-21 12:04 Paul Mackerras
2009-03-21 12:52 ` Andrew Morton
2009-03-21 15:52   ` Ingo Molnar
2009-03-21 15:54   ` Ingo Molnar [this message]
2009-03-21 16:10     ` [tree] Performance Counters for Linux, v7 Ingo Molnar
2009-03-22  6:48       ` Jaswinder Singh Rajput
2009-03-23 22:06         ` Ingo Molnar
2009-03-21 23:13   ` [PATCH v2] perfcounters: record time running and time enabled for each counter Paul Mackerras
2009-03-22  8:55     ` Andrew Morton
2009-03-22 11:44       ` Paul Mackerras
2009-03-22 17:16     ` Ray Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090321155442.GB6356@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®