Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755354AbcLNL5Z (ORCPT ); Wed, 14 Dec 2016 06:57:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44062 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755211AbcLNL5Y (ORCPT ); Wed, 14 Dec 2016 06:57:24 -0500 Date: Wed, 14 Dec 2016 12:33:39 +0100 From: Jiri Olsa To: "Liang, Kan" Cc: Peter Zijlstra , "Jiri Olsa (jolsa@kernel.org)" , Andi Kleen , lkml , Ingo Molnar , Michael Petlan Subject: Re: [RFC] perf/x86/intel/uncore: pmu->type->single_fixed question Message-ID: <20161214113339.GA2960@krava> References: <20161130105105.GA25720@krava> <37D7C6CF3E00A74B8858931C1DB2F07750CA4697@SHSMSX103.ccr.corp.intel.com> <878ts0vos0.fsf@firstfloor.org> <37D7C6CF3E00A74B8858931C1DB2F07750CA4D86@SHSMSX103.ccr.corp.intel.com> <20161201163755.GM3092@twins.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F077536777DA@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077536777DA@SHSMSX103.ccr.corp.intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 14 Dec 2016 11:33:42 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1611 Lines: 47 On Mon, Dec 12, 2016 at 02:49:03PM +0000, Liang, Kan wrote: > > > > I really would prefer to move the thing to its own PMU. > > The patch as below creates a new PMU to fix the issue. > > Jirka, could you please try the patch on your machine? > > > Thanks, > Kan > ------- > From 2de8b2eda6b54734e08a608b5fc8c367b94369d3 Mon Sep 17 00:00:00 2001 > From: Kan Liang > Date: Mon, 12 Dec 2016 09:03:35 -0500 > Subject: [PATCH] perf/x86/intel/uncore: fix nonexistent clockticks event for > client uncore > > The clockticks event can only be used by the first Cbox pmu. Other > Cboxes don't allow to open clockticks event, eventhough it's announced > via /sys/../events/.. > > For client uncore, there is only one clocktick fixed counter. Current > kernel code forces that only the first box can access the fixed counter > in uncore_pmu_event_init. But it doesn't take care of the the > attr_groups. All the pmus of same type share the same attr_groups. If > the clockticks event is set for the first box, user can also observe the > event in other boxes. > > The clocktick fixed counter is a standalone counter. It should be > removed from the Cbox PMUs. A new type of PMU is added which only > supports fixed counter events. > > User observable changes with the patch. > clockticks event is removed from Cbox. It will return unsupported, if > uncore_cbox_0/clockticks/ is accessed. User may need to change their > script to use uncore_clock/clockticks/ to instead. > > Signed-off-by: Kan Liang seems ok Tested-by: Jiri Olsa thanks, jirka