From: Peter Zijlstra <peterz@infradead.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Stephane Eranian <eranian@google.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Don Zickus <dzickus@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC perf,x86] P4 PMU early draft
Date: Wed, 10 Feb 2010 11:52:55 +0100 [thread overview]
Message-ID: <1265799175.11509.271.camel@laptop> (raw)
In-Reply-To: <aa79d98a1002100238v256ca6daw5e00c8b6d8dc4bb6@mail.gmail.com>
On Wed, 2010-02-10 at 13:38 +0300, Cyrill Gorcunov wrote:
> > I'd try BUG_ON(cpu != smp_processor_id()) and scrap passing that cpu
> > thing around.
> >
>
> no, i need cpu to find out if event has migrated from other thread and
> then i switch
> some thread dependant flags in hw::config (ie escr and cccr), or i
> miss something and events in one cpu just can't migrate to another
> cpu?
Well, if we validate that cpu == smp_processor_id() (looking at
kernel/perf_event.c that does indeed seem true for
hw_perf_group_sched_in() -- which suggests we should simply remove that
cpu argument), and that cpu will stay constant throughout the whole
callchain (it does, its a local variable), we can remove it and
substitute smp_processor_id(), right?
As to migration of the event, its tied to a task, we're now installing
the event for a task it wouldn't make sense to allow that to be
preemptible.
next prev parent reply other threads:[~2010-02-10 10:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 18:45 [RFC perf,x86] P4 PMU early draft Cyrill Gorcunov
2010-02-08 21:56 ` Cyrill Gorcunov
2010-02-09 4:17 ` Ingo Molnar
2010-02-09 6:54 ` Cyrill Gorcunov
2010-02-09 22:39 ` Cyrill Gorcunov
2010-02-10 10:12 ` Peter Zijlstra
2010-02-10 10:38 ` Cyrill Gorcunov
2010-02-10 10:52 ` Peter Zijlstra [this message]
2010-02-10 11:23 ` Cyrill Gorcunov
2010-02-11 12:21 ` Peter Zijlstra
2010-02-11 15:22 ` Cyrill Gorcunov
2010-02-26 10:25 ` [tip:perf/core] perf_events: Simplify code by removing cpu argument to hw_perf_group_sched_in() tip-bot for Peter Zijlstra
2010-02-09 4:23 ` [RFC perf,x86] P4 PMU early draft Paul Mackerras
2010-02-09 6:57 ` Cyrill Gorcunov
2010-02-09 8:54 ` Peter Zijlstra
2010-02-09 21:13 ` Stephane Eranian
2010-02-09 21:35 ` Cyrill Gorcunov
2010-02-15 20:11 ` Robert Richter
2010-02-15 20:32 ` Cyrill Gorcunov
2010-02-17 22:14 ` Cyrill Gorcunov
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=1265799175.11509.271.camel@laptop \
--to=peterz@infradead.org \
--cc=dzickus@redhat.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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