mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: stephane eranian <eranian@googlemail.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Yong Wang <yong.y.wang@linux.intel.com>,
	"Wang, Yong Y" <yong.y.wang@intel.com>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Andi Kleen <andi@firstfloor.org>
Subject: Re: perf_counter Atom patch
Date: Tue, 23 Jun 2009 11:40:55 +0200	[thread overview]
Message-ID: <7c86c4470906230240g7d748708s7b7b8af141c53c0c@mail.gmail.com> (raw)
In-Reply-To: <1245748205.19816.1550.camel@twins>

On Tue, Jun 23, 2009 at 11:10 AM, Peter Zijlstra<a.p.zijlstra@chello.nl> wrote:
> On Tue, 2009-06-23 at 16:34 +0800, Yong Wang wrote:
>> > you could simply consider having 0 fixed counters and everything else would work
>> > as expected. But there is a catch, unfortunately, in that there is erratum AE49
>> > which says that there is only one enable bit to control the two generic counters
>> > on Core Duo/Solo.
>
> Ah, that's similar to P6 like machines. The P6 docs say that to disable
> a counter you should simply write all zeros (except the EN bit for ctr0)
> to the control register (IIRC).
>
> I suppose we could do something similar on these errata cores, make
> x86_pmu_disable_counter() write ARCH_PERFMON_EVENTSEL0_ENABLE instead.
>
> Would that work?
>
I suspect that to make this work correctly on P6 and Core Duo,  you
will have to enforce
only one event/group to maintain the independence you expose at the
user level. An
Alternative would be to ensure that:
   - group leader in always in counter0
   - sibling events are created with disabled=0
   - ioctl(ENABLE/DISABLE) on siblings always fail

Of course, this does not work, if the group leader event requires
counter1. But I have to check
if such restriction exists on Core Duo.

  reply	other threads:[~2009-06-23  9:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-22 20:26 stephane eranian
2009-06-23  3:38 ` Wang, Yong Y
2009-06-23  7:45   ` stephane eranian
2009-06-23  7:59     ` Yong Wang
2009-06-23  8:27       ` stephane eranian
2009-06-23  8:34         ` Yong Wang
2009-06-23  9:10           ` Peter Zijlstra
2009-06-23  9:40             ` stephane eranian [this message]
2009-06-23  8:40         ` stephane eranian
2009-06-23  8:53           ` Yong Wang
2009-06-23  9:19             ` stephane eranian
2009-06-23  9:47             ` Ingo Molnar
2009-06-24  2:19               ` Yong Wang
2009-06-24  8:52                 ` Ingo Molnar
2009-06-25 10:39                   ` stephane eranian
2009-06-23  5:59 ` Wang, Yong Y

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=7c86c4470906230240g7d748708s7b7b8af141c53c0c@mail.gmail.com \
    --to=eranian@googlemail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=andi@firstfloor.org \
    --cc=eranian@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=yong.y.wang@intel.com \
    --cc=yong.y.wang@linux.intel.com \
    /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®