public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: eranian@google.com
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, paulus@samba.org,
	davem@davemloft.net, fweisbec@gmail.com,
	perfmon2-devel@lists.sf.net, eranian@gmail.com,
	robert.richter@amd.com
Subject: Re: [PATCH] perf_events: fix the fix for transaction recovery in group_sched_in()
Date: Wed, 20 Oct 2010 12:32:25 +0200	[thread overview]
Message-ID: <1287570745.2703.7.camel@twins> (raw)
In-Reply-To: <4cbe1191.8709d80a.1d10.ffff9970@mx.google.com>

On Tue, 2010-10-19 at 23:45 +0200, Stephane Eranian wrote:
> This patch fixes the group_sched_in() fix added by commit 8e5fc1a.
> Although the patch solved the issue with time_running, time_enabled
> for all events in a group, it had one flaw in case the group could
> never be scheduled. It would cause time_enabled to get negative.
> The issue was that tstamp_stopped was never updated, even though
> tstamp_enabled was.
> 
> This new version is much simpler and ensures that in case of
> error in group_sched_in() during event_sched_in(), the events up
> to the failed event go through regular event_sched_out(). But the
> failed event and the remaining events in the group have their timings
> adjusted as if they had also gone through event_sched_in() and
> event_sched_out(). This ensures timing uniformity across all
> events in a group. This also takes care of the tstamp_stopped problem
> in case the group could never be scheduled. The tstamp_stopped is
> updated as if the event had actually run.
> 
> With this patch, the following now reports correct time_enabled,
> in case the NMI watchdog is active:

Hehe, good thing I didn't tag that commit as stable then.. ;-)

Could you respin this one as two patches, one a clean revert and two the
proper fix? That way its clearer what the actual change is and it eases
backporting..

      reply	other threads:[~2010-10-20 10:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19 21:45 [PATCH] perf_events: fix the fix for transaction recovery in group_sched_in() Stephane Eranian
2010-10-20 10:32 ` Peter Zijlstra [this message]

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=1287570745.2703.7.camel@twins \
    --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 \
    --cc=robert.richter@amd.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