Re: [PATCH] perf_events: fix the fix for transaction recovery ingroup_sched_in()

From: Peter Zijlstra
Date: Wed Oct 20 2010 - 06:32:51 EST


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..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/