Received: by 10.223.148.5 with SMTP id 5csp7169553wrq; Thu, 18 Jan 2018 01:44:09 -0800 (PST) X-Google-Smtp-Source: ACJfBotnEPsfr/thgeku2LTCHoq8Q5EC8HlYSH35Ophq8sRWqCzat33XAhuCX6wPiPkCD4NpMz44 X-Received: by 10.101.81.7 with SMTP id f7mr35117870pgq.439.1516268649842; Thu, 18 Jan 2018 01:44:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516268649; cv=none; d=google.com; s=arc-20160816; b=JLAmVO1PeVb6XuwsmLpKloO5M/VAbbNOKjZBo+BjGB5lx/VavVmIcp72VBOOq0egHT bCPrCayI5WUj7VN3PA8fhv0BEs/BtBTgUOG4FCaVBo0yK8/XaRNqjipquiwus6u+9RBc EgpGM6r0QemB+awqGWwkpfjrGT+o5/D90Hx9//8uevL/Woy9L8j/bcVRHTajfbHtCAND RsHrHqJcq7rMMoTSrtoWvHhoM2d4oh9gwGNQJREqhEPEiVROgrpiRH2+tl3brJfaexvY Thmav0YPcXvwWOs5yk2QPZ28sESk5Fbi5LhxS5M3mg3Myaq2wHD9KdXYtdbR/f7kqMrD qmTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=rrbp0De3kA5Mu+sMwDGZ2hkGAtRfNAUDhmR0Yxy54Go=; b=xiQmiod1U7v5Uen6YtlovX00NucsQ+PvGehmsNLYZfJJZ3wrfudssjUIQuvkhUQBpN vSvnPDIIQLQXWQCFIYL2KT4a7hmroBjjwDWl6y956qwYkr1iANP/HeRHENEpJsSRe9Qj 3nRUrVEohLCILMAcd05XD3vFCo7O9JRm1koAnntgL6zohejXeTgxMAKo/HOPq2jUVSiw hpPr0lIWNVNhAJWfrdIiMI8uQB79x/M7MQ9tec+lnKDf6pxEVpnYMBSHOhfrtPv9AXq9 eonv/6JVkeg8SYS43SBZuhHCgdk22Pt7EauhMOiWhpm/vHOpvosITwj+1U2q/6lNliCu wWxw== 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 s77si6433002pfa.172.2018.01.18.01.43.45; Thu, 18 Jan 2018 01:44:09 -0800 (PST) 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 S1755310AbeARJg4 (ORCPT + 99 others); Thu, 18 Jan 2018 04:36:56 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:48301 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754860AbeARJgy (ORCPT ); Thu, 18 Jan 2018 04:36:54 -0500 Received: from hsi-kbw-5-158-153-53.hsi19.kabel-badenwuerttemberg.de ([5.158.153.53] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ec6aP-00045q-It; Thu, 18 Jan 2018 10:34:17 +0100 Date: Thu, 18 Jan 2018 10:36:42 +0100 (CET) From: Thomas Gleixner To: Kan Liang cc: mingo@redhat.com, peterz@infradead.org, linux-kernel@vger.kernel.org, acme@kernel.org, eranian@google.com, ak@linux.intel.com Subject: Re: [PATCH V5 1/8] perf/x86/intel/uncore: customized event_read for client IMC uncore In-Reply-To: <1516042629-387021-1-git-send-email-kan.liang@intel.com> Message-ID: References: <1516042629-387021-1-git-send-email-kan.liang@intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Jan 2018, kan.liang@intel.com wrote: > From: Kan Liang > > There are two free running counters for client IMC uncore. The custom > event_init() function hardcode their index to 'UNCORE_PMC_IDX_FIXED' and > 'UNCORE_PMC_IDX_FIXED + 1'. To support the 'UNCORE_PMC_IDX_FIXED + 1' > case, the generic uncore_perf_event_update is obscurely hacked. > The code quality issue will bring problem when new counter index is > introduced into generic code. For example, free running counter index. > > Introduce customized event_read function for client IMC uncore. > The customized function is exactly copied from previous generic > uncore_pmu_event_read. > The 'UNCORE_PMC_IDX_FIXED + 1' case will be isolated for client IMC > uncore only. > > Signed-off-by: Kan Liang Reviewed-by: Thomas Gleixner