All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/6] enable Memory Bandwidth Monitoring (MBM) for VMs
@ 2015-01-21 11:19 Chao Peng
  2015-01-21 11:19 ` [PATCH v5 1/6] x86: allow IRQ to be disabled for resource access Chao Peng
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Chao Peng @ 2015-01-21 11:19 UTC (permalink / raw)
  To: xen-devel
  Cc: wei.liu2, Ian.Campbell, stefano.stabellini, Ian.Jackson,
	will.auld, JBeulich, keir

Changes from v4:
* Make the counter read and timestamp read atomic by disable IRQ;
* Treat MSR_IA32_TSC as a special case and return NOW() for read path;
* Add MBM description in xl command line.

Changes from v3:
* Get timestamp information from host along with the monitoring counter;
  This is required for counter overlow detection.
* Address comments from Wei on the last patch.

Changes from v2:
* Remove the usage of "static" to cache data in xc;
  NOTE: Other places that already existed before are not touched due to
        the needs for API change. Will fix in separate patch if desirable.
* Coding style;

Changes from v1:
* Move event type check from xc to xl;
* Add retry capability for MBM sampling;
* Fix Coding style/docs;

Intel Memory Bandwidth Monitoring(MBM) is a new hardware feature
which builds on the CMT infrastructure to allow monitoring of system
memory bandwidth. Event codes are provided to monitor both "total"
and "local" bandwidth, meaning bandwidth over QPI and other external
links can be monitored.

For XEN, MBM is used to monitor memory bandwidth for VMs. Due to its
dependency on CMT, the software also makes use of most of CMT codes.
Actually, besides introducing two additional events and some cpuid
feature bits, there are no extra changes compared to cache occupancy
monitoring in CMT. Due to this, CMT should be enabled first to use
this feature.

For interface changes, the patch serial introduces a new command
"XEN_SYSCTL_PSR_CMT_get_l3_event_mask" which exposes MBM feature
capability to user space and modified "resource_op" to support reading
host timestamp.
Tool stack side, two additional options introduced for "xl psr-cmt-show":
total_mem_bandwidth:     Show total memory bandwidth
local_mem_bandwidth:     Show local memory bandwidth

The usage flow keeps the same with CMT.

Chao Peng (5):
  x86: allow reading MSR_IA32_TSC with XENPF_resource_op
  tools: add routine to get CMT L3 event mask
  tools: correct coding style for psr
  tools: code refactoring for MBM
  tools, docs: add total/local memory bandwith monitoring

 docs/man/xl.pod.1                   |   9 +++
 docs/misc/xen-command-line.markdown |   3 +
 tools/libxc/include/xenctrl.h       |  14 ++--
 tools/libxc/xc_msr_x86.h            |   1 +
 tools/libxc/xc_psr.c                |  66 +++++++++++++---
 tools/libxl/libxl.h                 |  20 ++++-
 tools/libxl/libxl_psr.c             | 153 +++++++++++++++++++++++++++++++++---
 tools/libxl/libxl_types.idl         |   2 +
 tools/libxl/xl_cmdimpl.c            |  72 ++++++++++++-----
 tools/libxl/xl_cmdtable.c           |   4 +-
 xen/arch/x86/platform_hypercall.c   |  37 ++++++++-
 xen/include/public/platform.h       |   3 +-
 12 files changed, 324 insertions(+), 60 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-01-23  8:58 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 11:19 [PATCH v5 0/6] enable Memory Bandwidth Monitoring (MBM) for VMs Chao Peng
2015-01-21 11:19 ` [PATCH v5 1/6] x86: allow IRQ to be disabled for resource access Chao Peng
2015-01-22 11:18   ` Jan Beulich
2015-01-21 11:19 ` [PATCH v5 2/6] x86: allow reading MSR_IA32_TSC with XENPF_resource_op Chao Peng
2015-01-22 11:20   ` Jan Beulich
2015-01-22 12:53     ` Chao Peng
2015-01-22 13:36       ` Jan Beulich
2015-01-22 14:03         ` Andrew Cooper
2015-01-22 14:09           ` Jan Beulich
2015-01-23  8:42             ` Chao Peng
2015-01-23  8:58               ` Jan Beulich
2015-01-21 11:19 ` [PATCH v5 3/6] tools: add routine to get CMT L3 event mask Chao Peng
2015-01-21 11:19 ` [PATCH v5 4/6] tools: correct coding style for psr Chao Peng
2015-01-21 11:19 ` [PATCH v5 5/6] tools: code refactoring for MBM Chao Peng
2015-01-21 11:19 ` [PATCH v5 6/6] tools, docs: add total/local memory bandwith monitoring Chao Peng
2015-01-21 11:28 ` [PATCH v5 0/6] enable Memory Bandwidth Monitoring (MBM) for VMs Jan Beulich
2015-01-22  1:12   ` Chao Peng
2015-01-22  7:59     ` Jan Beulich
2015-01-22 10:36       ` Chao Peng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.