Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755076AbcDTO4Y (ORCPT ); Wed, 20 Apr 2016 10:56:24 -0400 Received: from www.linutronix.de ([62.245.132.108]:44714 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932464AbcDTO4O (ORCPT ); Wed, 20 Apr 2016 10:56:14 -0400 Date: Wed, 20 Apr 2016 16:54:40 +0200 (CEST) From: Thomas Gleixner To: "Liang, Kan" cc: "peterz@infradead.org" , "linux-kernel@vger.kernel.org" , "ak@linux.intel.com" , "eranian@google.com" Subject: RE: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL client uncore In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077058E4102@SHSMSX103.ccr.corp.intel.com> Message-ID: References: <1460708620-47969-1-git-send-email-kan.liang@intel.com> <37D7C6CF3E00A74B8858931C1DB2F077058E4102@SHSMSX103.ccr.corp.intel.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 932 Lines: 23 On Wed, 20 Apr 2016, Liang, Kan wrote: > > The stop of the box1 events disables the whole machinery on that node and > > therefor the box0 event is wreckaged as well. Hmm? > > > Right. How about check the SKL_UNC_PERF_GLOBAL_CTL in enable_event? If it's > cleared, we can reset it there. The drawback is that there will be an extra > rdmsrl and a possible wrmsrl. Well, that does not buy anything as you cannot disable the thing at all, unless you have refcounting. And that refcounting needs to be in the 'type' struct and that would probably be some real pain to implement. The question is whether we need enable/disable at all. If the type is initialized we enable it and on exit we disable it. Ditto on cpu hotplug - which is also used for init to enable all nodes. So if there is no drawback in letting the thing enabled if no events are armed, then we really can do w/o the enable/disable_box callbacks. Thanks, tglx