From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753500AbcB2WM5 (ORCPT ); Mon, 29 Feb 2016 17:12:57 -0500 Received: from mga09.intel.com ([134.134.136.24]:17231 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbcB2WMz convert rfc822-to-8bit (ORCPT ); Mon, 29 Feb 2016 17:12:55 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,521,1449561600"; d="scan'208";a="926542529" From: "Liang, Kan" To: Jiri Olsa , Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , "Andi Kleen" , Stephane Eranian , Wang Nan , "zheng.z.yan@intel.com" CC: LKML Subject: RE: [BUG] Core2 cpu triggers hard lockup with perf test Thread-Topic: [BUG] Core2 cpu triggers hard lockup with perf test Thread-Index: AQHRcVuaNfzaxCoUS0OPO/ofdqmbtp9DmWog Date: Mon, 29 Feb 2016 22:12:08 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F0770589EC94@SHSMSX103.ccr.corp.intel.com> References: <20160227123636.GB30858@krava.redhat.com> In-Reply-To: <20160227123636.GB30858@krava.redhat.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGIyMzllMDQtNjJhMC00NzQ4LWJhYWUtZWE0NjhhYWNhYWFlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InU3K1E2UnB4bldaRm5mZXpqc091ZkJJd2crdThKXC9xQ1ljdFk2NFo0dDRRPSJ9 x-ctpclassification: CTP_IC 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 > > I can't find what's special about Core2 CPU PEBS setup, it seems that oher > CPUs are ok (tried on ivb/snb/hsw). > > reverting the 156174999dd1 fixed the issue for me > > ideas? thanks, I think we may just disable the multiple pebs support for core2 as the patch below. In SDM "18.4.4.4 Re-configuring PEBS Facilities" it mentioned that a quiescent period is needed between stopping the prior event counting and setting up a new PEBS event when software needs to reconfigure PEBS facilities. The quiescent period is to allow any latent residual PEBS records to complete its capture at their previously specified buffer address That requirement only can be found in Core Microarchitecture. I think it may implies that there is some observed delay in writing PEBS buffer. So if perf record precise hw event with very small period, the slow PEBS writing may lockup the CPU. If so, I think disabling the multiple pebs should be a good way. --- arch/x86/events/intel/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 8fddb02..a56230f 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -2577,8 +2577,8 @@ static int intel_pmu_hw_config(struct perf_event *event) if (event->attr.precise_ip) { if (!event->attr.freq) { event->hw.flags |= PERF_X86_EVENT_AUTO_RELOAD; - if (!(event->attr.sample_type & - ~intel_pmu_free_running_flags(event))) + if ((x86_pmu.intel_cap.pebs_format > 0) && + !(event->attr.sample_type & ~intel_pmu_free_running_flags(event))) event->hw.flags |= PERF_X86_EVENT_FREERUNNING; } if (x86_pmu.pebs_aliases) -- 2.5.0 Thanks, Kan