public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	linux-kernel@vger.kernel.org, mingo@elte.hu, paulus@samba.org,
	davem@davemloft.net, perfmon2-devel@lists.sf.net,
	eranian@gmail.com
Subject: Re: [PATCH] perf_events: improve x86 event scheduling (v5)
Date: Mon, 18 Jan 2010 15:33:03 +0100	[thread overview]
Message-ID: <1263825183.4283.593.camel@laptop> (raw)
In-Reply-To: <bd4cb8901001180612g29369150h9db09470fa6000af@mail.gmail.com>

On Mon, 2010-01-18 at 15:12 +0100, Stephane Eranian wrote:
> > That said you do have a point, maybe we can express this particular
> > thing differently.. maybe a pre and post group call like:
> >
> >  void hw_perf_group_sched_in_begin(struct pmu *pmu)
> >  int  hw_perf_group_sched_in_end(struct pmu *pmu)
> >
> The issue with hw_perf_group_sched_in() is that because we do not know
> when we are done scheduling, we have to defer actual activation until
> hw_perf_enable(). But  we have to still mark the events as ACTIVE,
> otherwise things go wrong in the generic layer and for non-PMU events.
> That leads to partial duplication of event_sched_in()/event_sched_out()
> in the PMU specific layer.
> 
> As Frederic pointed out, the more natural way would be to simply rely
> on event_sched_in()/event_sched_out() and the rollback logic and just
> drop hw_perf_group_sched_in() which is there as an optimization and
> not for correctness. Scheduling can be done incrementally from the
> event_sched_in() function.
> 
> > That way we know we need to track more state for rollback and can give
> > the pmu implementation leeway to delay scheduling/availablility tests.
> >
> Rollback would still be handled by the generic code, wouldn't it?

I'm not sure I understand your reply. Sure dropping
hw_perf_group_sched_in() is still correct, but its also less optimal,
since we have to determine schedulability for each incremental event.




  parent reply	other threads:[~2010-01-18 14:33 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18  8:58 [PATCH] perf_events: improve x86 event scheduling (v5) Stephane Eranian
2010-01-18 13:43 ` Frederic Weisbecker
2010-01-18 13:54   ` Peter Zijlstra
2010-01-18 14:12     ` Stephane Eranian
2010-01-18 14:20       ` Peter Zijlstra
2010-01-18 14:33       ` Peter Zijlstra [this message]
2010-01-18 14:20     ` Frederic Weisbecker
2010-01-18 14:32       ` Peter Zijlstra
2010-01-18 14:45         ` Frederic Weisbecker
2010-01-18 14:56           ` Peter Zijlstra
2010-01-18 16:18             ` Frederic Weisbecker
2010-01-18 16:26               ` Peter Zijlstra
2010-01-18 16:51                 ` Frederic Weisbecker
2010-01-18 17:13                   ` Peter Zijlstra
2010-01-18 17:29                     ` Frederic Weisbecker
2010-01-18 20:01                       ` Peter Zijlstra
2010-01-19 12:22                       ` Peter Zijlstra
2010-01-19 13:24                         ` Peter Zijlstra
2010-01-19 15:55                           ` Frederic Weisbecker
2010-01-19 16:25                             ` Peter Zijlstra
2010-02-27 17:38                               ` Frederic Weisbecker
2010-01-19 15:40                         ` Frederic Weisbecker
2010-01-21 10:08           ` Stephane Eranian
2010-01-21 10:11             ` Peter Zijlstra
2010-01-21 10:21               ` Stephane Eranian
2010-01-21 10:28                 ` Peter Zijlstra
2010-01-21 10:38                   ` Stephane Eranian
2010-01-21 10:45             ` Frederic Weisbecker
2010-01-21 11:44               ` Stephane Eranian
2010-01-21 12:02                 ` Frederic Weisbecker
2010-01-18 14:37       ` Peter Zijlstra
2010-01-18 14:53         ` Frederic Weisbecker
2010-01-18 14:59           ` Peter Zijlstra
2010-01-18 16:22             ` Frederic Weisbecker
2010-01-21 10:36 ` Peter Zijlstra
2010-01-21 10:43   ` Stephane Eranian
2010-01-21 10:46     ` Peter Zijlstra
2010-01-21 14:06       ` Stephane Eranian
2010-01-21 13:55 ` [tip:perf/urgent] perf: x86: Add support for the ANY bit tip-bot for Stephane Eranian
2010-01-29  9:26 ` [tip:perf/core] perf_events, x86: Improve x86 event scheduling tip-bot for Stephane Eranian

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=1263825183.4283.593.camel@laptop \
    --to=peterz@infradead.org \
    --cc=davem@davemloft.net \
    --cc=eranian@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=perfmon2-devel@lists.sf.net \
    /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