Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756679AbcLTSFX convert rfc822-to-8bit (ORCPT ); Tue, 20 Dec 2016 13:05:23 -0500 Received: from mga07.intel.com ([134.134.136.100]:17506 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474AbcLTSFV (ORCPT ); Tue, 20 Dec 2016 13:05:21 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,379,1477983600"; d="scan'208";a="205032275" From: "Liang, Kan" To: Jiri Olsa , Peter Zijlstra , "Ingo Molnar" CC: "Jiri Olsa (jolsa@kernel.org)" , Andi Kleen , lkml , Michael Petlan Subject: RE: [RFC] perf/x86/intel/uncore: pmu->type->single_fixed question Thread-Topic: [RFC] perf/x86/intel/uncore: pmu->type->single_fixed question Thread-Index: AQHSSzJ8QmQH3wRWmkOE9GJRGPB73aDzSKXg//99YoCAEa7+YIACak2AgApgd2A= Date: Tue, 20 Dec 2016 18:05:16 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F07753683434@SHSMSX103.ccr.corp.intel.com> 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> <20161214113339.GA2960@krava> In-Reply-To: <20161214113339.GA2960@krava> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzQ5NzIxOTEtZWVmMy00MDAyLTkzYTAtNjYwNGZmM2I0YTU4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InBQcmJhZVZ6SnJ1VU5YY3RIRzIwaWg2ejE4c0xHNUYwQ2JUVzRSaUJcL3ZjPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1766 Lines: 55 > 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 > Hi Peter and Ingo, Any comments for the patch? Do I need to re-send it? Thanks, Kan