Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753866AbcCAXr7 (ORCPT ); Tue, 1 Mar 2016 18:47:59 -0500 Received: from mga09.intel.com ([134.134.136.24]:58944 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753739AbcCAXr6 (ORCPT ); Tue, 1 Mar 2016 18:47:58 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,524,1449561600"; d="scan'208";a="662132584" From: Vikas Shivappa To: vikas.shivappa@intel.com, vikas.shivappa@linux.intel.com Cc: linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, ravi.v.shankar@intel.com, tony.luck@intel.com, fenghua.yu@intel.com, h.peter.anvin@intel.com Subject: [PATCH V5 0/6] Intel memory b/w monitoring support Date: Tue, 1 Mar 2016 15:48:22 -0800 Message-Id: <1456876108-28770-1-git-send-email-vikas.shivappa@linux.intel.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2665 Lines: 59 The patch series has two preparatory patch for cqm and then 4 MBM patches. Patches are based on tip perf/core. Thanks to Thomas for feedback on V4 and have tried to implement his feedback in this version. Memory bandwitdh monitoring(MBM) provides OS/VMM a way to monitor bandwidth from one level of cache to another. The current patches support L3 external bandwitch monitoring. It supports both 'local bandwidth' and 'total bandwidth' monitoring for the socket. Local bandwidth measures the amount of data sent through the memory controller on the socket and total b/w measures the total system bandwidth. The tasks are associated with a Resouce Monitoring ID(RMID) just like in cqm and OS uses a MSR write to indicate the RMID of the task during scheduling. Memory bandwitdh monitoring(MBM) provides OS/VMM a way to monitor bandwidth from one level of cache to another. The current patches support L3 external bandwitch monitoring. It supports both 'local bandwidth' and 'total bandwidth' monitoring for the socket. Local bandwidth measures the amount of data sent through the memory controller on the socket and total b/w measures the total system bandwidth. Extending the cache quality of service monitoring(CQM) we add four more events to the perf infrastructure. intel_cqm_llc/local_bytes - bytes sent through local socket memory controller intel_cqm_llc/total_bytes - total L3 external bytes sent intel_cqm_llc/local_bw - Current local b/w intel_cqm_llc/total_bw - current total b/w The tasks are associated with a Resouce Monitoring ID(RMID) just like in cqm and OS uses a MSR write to indicate the RMID of the task during scheduling. Changes in V5: As per Thomas feedback made the below changes: - Fixed the memory leak and notifier leak in cqm init and also made it a separate patch - Changed mbm patch to using topology_max_packages to count the max packages rather than online packages. - Removed the unnecessary out: label and goto in the 0003 . - Fixed the restarting of timer when the event list is empty. - Also Fixed the incorrect usage of mutex in timer context. Changes in v4: The V4 version of MBM is almost a complete rewrite of the prior versions except for some declarations. It has seemed the best way to address all of Thomas earlier comments. [PATCH 1/6] x86,perf/cqm: Fix cqm handling of grouping events into a [PATCH 2/6] x86,perf/cqm: Fix cqm memory leak and notifier leak [PATCH 3/6] x86/mbm: Intel Memory B/W Monitoring enumeration and init [PATCH 4/6] x86/mbm: Memory bandwidth monitoring event management [PATCH 5/6] x86/mbm: RMID Recycling MBM changes [PATCH 6/6] x86/mbm: Add support for MBM counter overflow handling