Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932281AbbDQMum (ORCPT ); Fri, 17 Apr 2015 08:50:42 -0400 Received: from mga11.intel.com ([192.55.52.93]:2442 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932162AbbDQMui convert rfc822-to-8bit (ORCPT ); Fri, 17 Apr 2015 08:50:38 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,594,1422950400"; d="scan'208";a="681662133" From: "Liang, Kan" To: Peter Zijlstra CC: "linux-kernel@vger.kernel.org" , "mingo@kernel.org" , "acme@infradead.org" , "eranian@google.com" , "andi@firstfloor.org" Subject: RE: [PATCH V6 4/6] perf, x86: handle multiple records in PEBS buffer Thread-Topic: [PATCH V6 4/6] perf, x86: handle multiple records in PEBS buffer Thread-Index: AQHQcuOigw7xCvn/hUe7BKfFP5+bOZ1PHNcAgAFDWQCAANCvMA== Date: Fri, 17 Apr 2015 12:50:33 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077017CB364@SHSMSX103.ccr.corp.intel.com> References: <1428597466-8154-1-git-send-email-kan.liang@intel.com> <1428597466-8154-5-git-send-email-kan.liang@intel.com> <20150416125342.GZ23123@twins.programming.kicks-ass.net> <20150417081100.GZ24151@twins.programming.kicks-ass.net> In-Reply-To: <20150417081100.GZ24151@twins.programming.kicks-ass.net> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 32 > > > > A) the CTRn value reaches 0: > > - the corresponding bit in GLOBAL_STATUS gets set > > - we start arming the hardware assist > > > > < some unspecified amount of time later -- > > this could cover multiple events of interest > > > > > B) the hardware assist is armed, any next event will trigger it > > > > C) a matching event happens: > > - the hardware assist triggers and generates a PEBS record > > this includes a copy of GLOBAL_STATUS at this moment > > - if we auto-reload we (re)set CTRn > > Is this actually true? Do we reload here or on A ? > Yes, on C. According to SDM Volume 3, 18.7.1.1, the reset value will be loaded after each PEBS record is written, which is done by hw assist. > > - we clear the relevant bit in GLOBAL_STATUS -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/