From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759500Ab0FJQMq (ORCPT ); Thu, 10 Jun 2010 12:12:46 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:59945 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759457Ab0FJQMk (ORCPT ); Thu, 10 Jun 2010 12:12:40 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=b/pcBYM43rw+sOuww4cDC33e8qo6Mcigg9HaGDRl9EdFON+FgcUAOKnrJN+lvbv5Wp 39zo9h7MYMzKwVFEpK3Bx0P7sWecTz6gaylefDFguo8+Ofy4njciC1ZbKhWB5bbZ8Zm7 qSYApBHaUWFWymbwE+36q3HhWzhh5wIJJwKsw= Date: Thu, 10 Jun 2010 18:12:37 +0200 From: Frederic Weisbecker To: Peter Zijlstra Cc: Ingo Molnar , LKML , Arnaldo Carvalho de Melo , Paul Mackerras , Stephane Eranian , Cyrill Gorcunov , Zhang Yanmin , Steven Rostedt Subject: Re: [PATCH 1/5] perf: Provide a proper stop action for software events Message-ID: <20100610161234.GA5255@nowhere> References: <1276141760-11590-1-git-send-regression-fweisbec@gmail.com> <1276141760-11590-2-git-send-regression-fweisbec@gmail.com> <1276166813.2077.96.camel@twins> <1276168242.2077.134.camel@twins> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1276168242.2077.134.camel@twins> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 10, 2010 at 01:10:42PM +0200, Peter Zijlstra wrote: > On Thu, 2010-06-10 at 12:46 +0200, Peter Zijlstra wrote: > > > > Something like the below would work, the only 'problem' is that it grows > > hw_perf_event. > > If we do the whole PAUSEd thing right, we'd not need this I think. It's not needed, and moreover software_pmu:stop/start() can be the same than software:pmu:disable/enable() without the need to add another check in the fast path. But we need perf_event_stop/start() to work on software events. And in fact now that we use the hlist_del_init, it's safe, but a bit wasteful in the period reset path. That's another problem that is not critical, but if you want to solve this by ripping the differences between software and hardware (which I agree with), we need a ->reset_period callback.