Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751485AbcDTQeu (ORCPT ); Wed, 20 Apr 2016 12:34:50 -0400 Received: from mga03.intel.com ([134.134.136.65]:55330 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750808AbcDTQet (ORCPT ); Wed, 20 Apr 2016 12:34:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,510,1455004800"; d="scan'208";a="88747394" Date: Wed, 20 Apr 2016 09:34:22 -0700 From: Andi Kleen To: "Liang, Kan" Cc: Thomas Gleixner , "peterz@infradead.org" , "linux-kernel@vger.kernel.org" , "eranian@google.com" Subject: Re: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL client uncore Message-ID: <20160420163422.GA19706@tassilo.jf.intel.com> References: <1460708620-47969-1-git-send-email-kan.liang@intel.com> <37D7C6CF3E00A74B8858931C1DB2F077058E4102@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077058E4102@SHSMSX103.ccr.corp.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 477 Lines: 13 > 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. It's better to not rely on register state for this. There are a variety of user space tools that manipulate the uncore MSRs through /dev/*/msr So better keep software state. Software state is also much faster than reading MSRs. -Andi -- ak@linux.intel.com -- Speaking for myself only