From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbdF1Rso (ORCPT ); Wed, 28 Jun 2017 13:48:44 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:33128 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751532AbdF1Rsf (ORCPT ); Wed, 28 Jun 2017 13:48:35 -0400 MIME-Version: 1.0 Reply-To: robert@ocallahan.org In-Reply-To: <20170628171943.GF8252@leverpostej> References: <2256f9b5-1277-c4b1-1472-61a10cd1db9a@linux.intel.com> <20170628101248.GB5981@leverpostej> <20170628171943.GF8252@leverpostej> From: "Robert O'Callahan" Date: Wed, 28 Jun 2017 10:48:33 -0700 X-Google-Sender-Auth: JpJaQM0EAzk9mvlPdSukJXjG1O4 Message-ID: Subject: Re: [REGRESSION] perf/core: PMU interrupts dropped if we entered the kernel in the "skid" region To: Mark Rutland Cc: Kyle Huey , "Jin, Yao" , Ingo Molnar , "Peter Zijlstra (Intel)" , stable@vger.kernel.org, Alexander Shishkin , Arnaldo Carvalho de Melo , Jiri Olsa , Linus Torvalds , Namhyung Kim , Stephane Eranian , Thomas Gleixner , Vince Weaver , acme@kernel.org, jolsa@kernel.org, kan.liang@intel.com, Will Deacon , gregkh@linuxfoundation.org, open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 28, 2017 at 10:19 AM, Mark Rutland wrote: > It seems odd that an event without any samples to take has a sample > period. I'm surprised that there's not *some* sample_type set. Yes, it is a bit odd :-). Rather than trying to gather some limited set of information about the target process, we want to interrupt its execution after a particular number of events have occurred. The bigger picture here is that we're replaying a previously recorded process execution. We want to the process to run until it reaches a particular state that occurred during recording; that state is identified by a value for the performance counter (retired conditional branches) plus the values of the general-purpose registers. So our first step is to run the process until the performance counter reaches a value less than but "close to" the target value. (We know the process will be interrupted after a number of extra events have occurred, so we set the sample period to a value less than the target by a heuristic "maximum skid size".) Rob -- lbir ye,ea yer.tnietoehr rdn rdsme,anea lurpr edna e hnysnenh hhe uresyf toD selthor stor edna siewaoeodm or v sstvr esBa kbvted,t rdsme,aoreseoouoto o l euetiuruewFa kbn e hnystoivateweh uresyf tulsa rehr rdm or rnea lurpr .a war hsrer holsa rodvted,t nenh hneireseoouot.tniesiewaoeivatewt sstvr esn