All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] perfcounters: Make s/w counters in a group only count when group is on
Date: Fri, 13 Mar 2009 23:23:22 +1100	[thread overview]
Message-ID: <18874.20538.785519.824803@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <1236939816.22914.3714.camel@twins>

Peter Zijlstra writes:

> The former case however, you seem to say we should keep software
> counters active even though their associated task is scheduled out? That
> doesn't appear to make sense to me.
> 
> Why would you want to do that?

Because the things that they are based on can get incremented when the
task is scheduled out.  This is most noticeable in the case of the
context switch counter and also happens with the task migrations
counter.  These *always* get incremented when the task is scheduled
out from the perf_counter subsystem's point of view, i.e. after
perf_counter_task_sched_out is called for the task and before the next
perf_counter_task_sched_in call.  I believe page faults can also
happen while the task is scheduled out, via access_process_vm.

I also originally thought that software counters should only count
while their task is scheduled in, which is why I introduced the bug
that I fixed in c07c99b67233ccaad38a961c17405dc1e1542aa4.  That commit
however left us with software counters that counted even when their
group wasn't on; hence the current patch.

Paul.

  reply	other threads:[~2009-03-13 12:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13  1:59 [PATCH] perfcounters: Make s/w counters in a group only count when group is on Paul Mackerras
2009-03-13 10:23 ` Peter Zijlstra
2009-03-13 12:23   ` Paul Mackerras [this message]
2009-03-13 12:44     ` Peter Zijlstra
2009-03-13 13:04       ` Peter Zijlstra
2009-03-13 13:13         ` Ingo Molnar
2009-03-13 23:43           ` Paul Mackerras
2009-03-13 22:41       ` Paul Mackerras
2009-03-14 11:51         ` Ingo Molnar
2009-03-16  9:56         ` Peter Zijlstra
2009-03-16 10:33           ` Paul Mackerras

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=18874.20538.785519.824803@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.