public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [REGRESSION] perf/core: PMU interrupts dropped if we entered the kernel in the "skid" region
@ 2017-06-28  0:38 Kyle Huey
  2017-06-28  1:01 ` Kyle Huey
  0 siblings, 1 reply; 38+ messages in thread
From: Kyle Huey @ 2017-06-28  0:38 UTC (permalink / raw)
  To: Jin Yao, Ingo Molnar
  Cc: Peter Zijlstra (Intel), stable, Alexander Shishkin,
	Arnaldo Carvalho de Melo, Jiri Olsa, Linus Torvalds, Namhyung Kim,
	Stephane Eranian, Thomas Gleixner, Vince Weaver, acme, jolsa,
	kan.liang, Mark Rutland, Will Deacon, gregkh,
	Robert O'Callahan

cc1582c231ea introduced a regression in v4.12.0-rc5, and appears to be
a candidate for backporting to stable branches.

rr, a userspace record and replay debugger[0], uses the PMU interrupt
to stop a program during replay to inject asynchronous events such as
signals.  We are counting retired conditional branches in userspace
only.  This changeset causes the kernel to drop interrupts on the
floor if, during the PMU interrupt's "skid" region, the CPU enters
kernel mode for whatever reason.  When replaying traces of complex
programs such as Firefox, we intermittently fail to deliver
asynchronous events on time, leading the replay to diverge from the
recorded state.

It seems like this change should, at a bare minimum, be limited to
counters that actually perform sampling of register state when the
interrupt fires.  In our case, with the retired conditional branches
counter restricted to counting userspace events only, it makes no
difference that the PMU interrupt happened to be delivered in the
kernel.

As this makes rr unusable on complex applications and cannot be
efficiently worked around, we would appreciate this being addressed
before 4.12 is finalized, and the regression not being introduced to
stable branches.

Thanks,

- Kyle

[0] http://rr-project.org/

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2017-07-18  0:07 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-28  0:38 [REGRESSION] perf/core: PMU interrupts dropped if we entered the kernel in the "skid" region Kyle Huey
2017-06-28  1:01 ` Kyle Huey
2017-06-28  2:09   ` Jin, Yao
2017-06-28  4:51     ` Kyle Huey
2017-06-28  5:35       ` Jin, Yao
2017-06-28  7:30         ` Kyle Huey
2017-06-28 10:12       ` Mark Rutland
2017-06-28 10:56         ` [PATCH] perf/core: generate overflow signal when samples are dropped (WAS: Re: [REGRESSION] perf/core: PMU interrupts dropped if we entered the kernel in the "skid" region) Mark Rutland
2017-06-28 12:40           ` Vince Weaver
2017-06-28 13:07             ` Mark Rutland
2017-06-29  8:13               ` Alexey Budankov
2017-06-29  8:25                 ` Alexey Budankov
2017-06-28 16:48           ` Kyle Huey
2017-06-28 17:49             ` Mark Rutland
2017-06-28 22:55               ` Kyle Huey
2017-06-29  0:27                 ` Jin, Yao
2017-06-30 17:44                 ` Kyle Huey
2017-07-04  9:03                 ` Peter Zijlstra
2017-07-04  9:33                   ` Mark Rutland
2017-07-04  9:46                     ` Peter Zijlstra
2017-07-04 10:21                     ` Mark Rutland
2017-07-06  5:07                       ` Robert O'Callahan
2017-07-11  2:03                         ` Kyle Huey
2017-07-11  9:03                           ` Ingo Molnar
2017-07-11 13:07                             ` Jin, Yao
2017-07-12  7:57                               ` Ingo Molnar
2017-07-11 14:26                             ` Mark Rutland
2017-07-11 15:32                             ` Kyle Huey
2017-07-18  0:07                               ` Kyle Huey
2017-06-29  8:12               ` Ingo Molnar
2017-07-04  9:06                 ` Peter Zijlstra
2017-07-04 10:04                   ` Ingo Molnar
2017-07-11  9:03           ` [tip:perf/urgent] Revert "perf/core: Drop kernel samples even though :u is specified" tip-bot for Ingo Molnar
2017-06-28 16:46         ` [REGRESSION] perf/core: PMU interrupts dropped if we entered the kernel in the "skid" region Kyle Huey
2017-06-28 17:19           ` Mark Rutland
2017-06-28 17:36             ` Kyle Huey
2017-06-28 17:52               ` Mark Rutland
2017-06-28 17:48             ` Robert O'Callahan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox