From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754617Ab2BFO3g (ORCPT ); Mon, 6 Feb 2012 09:29:36 -0500 Received: from merlin.infradead.org ([205.233.59.134]:43010 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752764Ab2BFO3f (ORCPT ); Mon, 6 Feb 2012 09:29:35 -0500 Subject: Re: WARNING: at arch/x86/kernel/cpu/perf_event.c:989 From: Peter Zijlstra To: Stephane Eranian Cc: Eric Dumazet , Ingo Molnar , Markus Trippelsdorf , linux-kernel@vger.kernel.org, Paul Mackerras In-Reply-To: References: <20120202211709.GA1642@x4> <20120202213220.GB1642@x4> <20120204135110.GA6437@elte.hu> <1328523130.2220.12.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> <1328526691.2220.16.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> Content-Type: text/plain; charset="UTF-8" Date: Mon, 06 Feb 2012 15:29:28 +0100 Message-ID: <1328538568.2482.5.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2012-02-06 at 15:13 +0100, Stephane Eranian wrote: > Ok, I found the problem! > > it comes from perf_adjust_freq_unthr_context() vs perf_adjust_period(). > The latter can under certain condition stop and restart the event. So we > had: > > stop() > if (delta > 0) { > perf_adjust_period() { > if (period > 8*...) { > stop() > ... > start() > } > } > } > start() > > Could have a double stop() and double start(), thus triggering the warning in > x86_pmu_start(). > > Will post a patch shortly to fix this. Nice, thanks for looking at this!