Received: by 10.223.164.221 with SMTP id h29csp2209097wrb; Thu, 2 Nov 2017 07:29:34 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Qd/Puj+ECI1NxNJr2qtqX6dAizr7gQeBW+EpAULEwJCEXOq525zshU/gFTmQfc1NZ4ut0B X-Received: by 10.84.254.79 with SMTP id a15mr3484806pln.413.1509632973929; Thu, 02 Nov 2017 07:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509632973; cv=none; d=google.com; s=arc-20160816; b=XtlM23++sS2zh3i27M1MU1Q8U30yyEipOElnXqGoK15w+DiHdm2CZpHRNEkARJYn2V ywXuow3R4jNsIRevh4iNrwlvdkK1pyOTehUuNlOEuE2Z+NXLvoBFnwUoMFzKTvaHEIT9 hIzbwyq3z/szOAB6GXim/AyUrb20O96i6+KSFrHvbvQhZMyLwl1kVaF55Kl0djQ7KiSJ mjKwb0gLmTwv4+FAOKi4Y8IHfxKlOlCc7PdQlYmDUDoPqaYhrFPflftjFeQyRrgNCpdc CSwSRWJEZF/iCdLEIApbTE1/qAeMLoWwjUdC7gc72XHrjY8BmPRjjYwiUv9ium5PzOD/ GkUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=sd6cRWTpzp5vM81Yx22KQO7I7DyUslDVGuqTrbESXP4=; b=xGt73HzyxbW3PvlzQTyR1OExfR4fTnPzpcG2YFGSuoMN1V3QWWGjGwP9nY8VHhI++i T/1WSuPSNEOZe7MLnJMoK36WuIrFb8jGE/m7eielr4ys37H8hHSvZ2yNFEj/TS0eHcot zHcaHvVsgTy44vlMGkg2cF4GEiSIqC253890flHWgSZhbdCGD6UxVxAMfAy4vixShB/U cZs3pq/fFEg7KWm/xPbkGa1JeAue3KdhfLpULGI19n/1WfhcToKnXxAsmLzx3ELcKGC/ 4bMN2FR5v7v6ovAki0j+tja2qXazXy+jEfato00/ShwsepZPXci296oLdFOgkVAKWnvj PWrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x136si3627955pgx.750.2017.11.02.07.29.20; Thu, 02 Nov 2017 07:29:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933493AbdKBO13 convert rfc822-to-8bit (ORCPT + 97 others); Thu, 2 Nov 2017 10:27:29 -0400 Received: from mga09.intel.com ([134.134.136.24]:44775 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933457AbdKBO11 (ORCPT ); Thu, 2 Nov 2017 10:27:27 -0400 Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Nov 2017 07:27:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,334,1505804400"; d="scan'208";a="171066266" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 02 Nov 2017 07:27:24 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Nov 2017 07:27:24 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Nov 2017 07:27:23 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Thu, 2 Nov 2017 22:27:21 +0800 From: "Liang, Kan" To: Thomas Gleixner CC: "peterz@infradead.org" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "acme@kernel.org" , "eranian@google.com" , "ak@linux.intel.com" Subject: RE: [PATCH V3 1/5] perf/x86/intel/uncore: customized pmu event read for client IMC uncore Thread-Topic: [PATCH V3 1/5] perf/x86/intel/uncore: customized pmu event read for client IMC uncore Thread-Index: AQHTTPn8N2Thg1PlBU23gMJh7UBtUqMAoguAgACGaBD//3vBgIAAAViAgACGcoD//3zEgIAAAYeAgACG4uA= Date: Thu, 2 Nov 2017 14:27:22 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077537DCA69@SHSMSX103.ccr.corp.intel.com> References: <1508843124-4081-1-git-send-email-kan.liang@intel.com> <37D7C6CF3E00A74B8858931C1DB2F077537DCA04@SHSMSX103.ccr.corp.intel.com> <37D7C6CF3E00A74B8858931C1DB2F077537DCA32@SHSMSX103.ccr.corp.intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmZlOWY4Y2UtMDdlOC00ODBmLWIzY2MtMmYxMzg3N2FkYTEzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik5OQWExMU1qUHdMc0pCQ01BTDJhalplRlNETUpjWlRpWHFQczgybzZPaGM9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Thu, 2 Nov 2017, Thomas Gleixner wrote: > > On Thu, 2 Nov 2017, Liang, Kan wrote: > > > > On Thu, 2 Nov 2017, Thomas Gleixner wrote: > > > > > On Thu, 2 Nov 2017, Liang, Kan wrote: > > > > > > Patch 5/5 will clean up the client IMC uncore. > > > > > > Before that, we still need it to make client IMC uncore work. > > > > > > > > > > > > This patch isolates the >= case for client IMC uncore. > > > > > > > > > > Fair enough. A comment to that effect (even when removed later) > > > > > would have avoided that question. > > > > > > > > Thinking more about it. The current code only supports the fixed one, > right? > > > > So why would it deal with anything > FIXED? > > > > > > > > > > There are two free running counters in IMC. > > > To support the second one, the previous code implicitly do > > > UNCORE_PMC_IDX_FIXED + 1. > > > So it has to deal with > FIXED case. > > > > > > case SNB_UNCORE_PCI_IMC_DATA_READS: > > > base = SNB_UNCORE_PCI_IMC_DATA_READS_BASE; > > > idx = UNCORE_PMC_IDX_FIXED; > > > break; > > > case SNB_UNCORE_PCI_IMC_DATA_WRITES: > > > base = SNB_UNCORE_PCI_IMC_DATA_WRITES_BASE; > > > idx = UNCORE_PMC_IDX_FIXED + 1; > > > break; > > > default: > > > return -EINVAL; > > > > Fugly that is, but as its cleaned up later.... > > But then you have this in uncore_perf_event_update(): > > - if (event->hw.idx >= UNCORE_PMC_IDX_FIXED) > + if (event->hw.idx == UNCORE_PMC_IDX_FIXED) > > So how is that supposed to work? This is for generic code. In previous code, the event_read function for IMC use generic code. So we have to deal with >= in generic code. Now, customized event_read function 'snb_uncore_imc_event_read' is introduced for IMC. So IMC does not touch the generic code. The generic code is corrected here. Thanks, Kan > > I think your patch order is wrong and breaks bisectability all over the place as > you fixup the UNCORE_PMC_IDX_FIXED + 1 hackery in 5/5. > > Thanks, > > tglx From 1582964221314611012@xxx Thu Nov 02 14:18:41 +0000 2017 X-GM-THRID: 1582166476632080836 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread