From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755271Ab2BFPC4 (ORCPT ); Mon, 6 Feb 2012 10:02:56 -0500 Received: from merlin.infradead.org ([205.233.59.134]:46531 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755084Ab2BFPCz (ORCPT ); Mon, 6 Feb 2012 10:02:55 -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> <1328538568.2482.5.camel@laptop> Content-Type: text/plain; charset="UTF-8" Date: Mon, 06 Feb 2012 16:02:48 +0100 Message-ID: <1328540568.2482.7.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:32 +0100, Stephane Eranian wrote: > I am wondering why we stop and restart the code in perf_adjust_period() > when it's called from __perf_event_overflow(). Isn't it supposed to be stopped > already by the model specific interrupt handler. Looks like we do stop/start, > just to get the reload aspect of start. Is that right? Yes it is in order to deal with the case where an excessively long period is programmed and we want to force load the new period without having to wait for the old one to complete. I hit that case several times with the adaptive code and events that have very uneven rates.