Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751266AbdFBPpR convert rfc822-to-8bit (ORCPT ); Fri, 2 Jun 2017 11:45:17 -0400 Received: from mga01.intel.com ([192.55.52.88]:39275 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751162AbdFBPpQ (ORCPT ); Fri, 2 Jun 2017 11:45:16 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,285,1493708400"; d="scan'208";a="94035793" From: "Liang, Kan" To: "'Jiri Olsa'" , "'Peter Zijlstra'" CC: "'acme@kernel.org'" , "'tglx@linutronix.de'" , "'mingo@redhat.com'" , "'linux-kernel@vger.kernel.org'" , "'eranian@google.com'" , "'jolsa@kernel.org'" , "'elliott@hpe.com'" , "'ak@linux.intel.com'" Subject: RE: [PATCH V2 0/2] measure SMI cost (user) Thread-Topic: [PATCH V2 0/2] measure SMI cost (user) Thread-Index: AQHS1loCbK8Dcn2RBk+ql3DCXcWnwaIKwGiAgAABr4CAAAa4AIAAw/xwgAYy39A= Date: Fri, 2 Jun 2017 15:45:11 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077537053C9@SHSMSX103.ccr.corp.intel.com> References: <1495825538-5230-1-git-send-email-kan.liang@intel.com> <20170529124637.GA1957@krava> <20170529125239.sxd7dp4gyjjtws5z@hirez.programming.kicks-ass.net> <20170529131642.GA3570@krava> <37D7C6CF3E00A74B8858931C1DB2F0775370293D@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F0775370293D@SHSMSX103.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDJlNDNlZTYtNzZiMC00OWM4LTg5MTAtMmQ4MjYxOGE2MmNiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkJaXC9za2dIbytWUEUyWnFOWFJGMDcxalM1MU1YZ0l4M1BabGlUbmdQdWtnPSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action 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: 1221 Lines: 44 > > > > On Mon, May 29, 2017 at 02:52:39PM +0200, Peter Zijlstra wrote: > > > On Mon, May 29, 2017 at 02:46:37PM +0200, Jiri Olsa wrote: > > > > > > > for some reason I can't get single SMI count generated, is there a > > > > setup/bench that would provoke that? > > > > > > Not having SMIs is a good thing ;-) > > > > > > Not sure we can tickle them in a reliable way. > > > > yea I saw some counts last time, now just zero so I was wondering if > > it's working > > > > We have internal test case which can generate SMI, but I cannot publish the > test case. Sorry about that. > APM_CNT (0xB2) could be used to trigger SMI#. It's documented in PCH datasheet. https://www.intel.com/content/dam/www/public/us/en/ documents/datasheets/9-series-chipset-pch-datasheet.pdf APM_CNT-Advanced Power Management Control Port Register I/O Address: B2h Attribute: R/W Default Value: 00h Size: 8 bits Lockable: No Usage: Legacy Only Power Well: Core Bit Description 7:0 Used to pass an APM command between the OS and the SMI handler. Writes to this port not only store data in the APMC register, but also generates an SMI# when the APMC_EN bit is set. You can write a byte to port 0xB2 to trigger an SMI# Thanks, Kan