[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 00/15] Enable Memory Bandwidth Allocation in Xen



Hi, all,

We plan to bring a new PSR (Platform Shared Resource) feature called
Intel Memory Bandwidth Allocation (MBA) to Xen.

Besides the MBA enabling, we change some interfaces to make them more
general but not only for CAT.

Any comments are welcome!

You can find this patch set at:
https://github.com/yisun-git/xen_mba mba_v2-2

---
Acked and Reviewed list before V2:

a - Acked-by
r - Reviewed-by

  ar patch 2  - Rename PSR sysctl/domctl interfaces and xsm policy to make them 
be general
  r  patch 3  - x86: rename 'cbm_type' to 'psr_val_type' to make it general
  ar patch 12 - tools: rename 'xc_psr_cat_type' to 'xc_psr_val_type'
  a  patch 13 - tools: implement new generic get value interface and MBA get 
value command
  a  patch 15 - docs: add MBA description in docs

---
V2 change list:

Patch 1:
    - declare 'HW' in Terminology.
      (suggested by Chao Peng)
    - replace 'COS ID of VCPU' to 'COS ID of domain'.
      (suggested by Chao Peng)
    - replace 'COS register' to 'Thrtl MSR'.
      (suggested by Chao Peng)
    - add description for 'psr-mba-show' to state that the decimal value is
      shown for linear mode but hexadecimal value is shown for non-linear mode.
      (suggested by Chao Peng)
    - remove content in 'Areas for improvement'.
      (suggested by Chao Peng)
    - use '<>' to specify mandatory argument to a command.
      (suggested by Wei Liu)
Patch3:
    - replace 'PSR_VAL_TYPE_{L3, L2}' to 'PSR_VAL_TYPE_{L3, L2}_CBM'.
      (suggested by Chao Peng)
Patch 4:
    - modify commit message to replace 'cos register' to 'thrtl register' to
      make it accurate.
      (suggested by Chao Peng)
    - restore the place of the sentence to assign value to 'feat->cbm_len'
      because the MBA init flow is splitted out as a separate function in v1.
      (suggested by Chao Peng)
    - add comment to explain what the MBA thrtl defaul value '0' stands for.
      (suggested by Chao Peng)
    - check 'thrtl_max' under linear mode. It could not be euqal or larger than
      100.
      (suggested by Chao Peng)
Patch 5:
    - use 'XEN_SYSCTL_PSR_MBA_LINEAR' to set MBA feature HW info.
      (suggested by Chao Peng)
Patch 7:
    - remove linear mode 'thrtl_max' check in 'mba_check_thrtl' because it has
      been checked in 'mba_init_feature'.
      (suggested by Chao Peng)
    - for non-linear mode, check if '*thrtl' is not 0 in 'mba_check_thrtl'. If
      it is 0, we do not need to change it.
      (suggested by Chao Peng)
    - move comments to explain changes of 'cos_write_info' from psr.c to commit
      message.
      (suggested by Chao Peng)
Patch 8:
    - remove '_INFO' in 'libxl_psr_feat_type' and make corresponding
      changes in 'libxl_psr_hw_info'.
      (suggested by Chao Peng)
Patch 9:
    - split this patch out from a big patch in v1.
      (suggested by Wei Liu)
    - change 'CAT_INFO' and 'MBA_INFO' to 'CAT' and 'MBA'.
      (suggested by Chao Peng)
Patch 10:
    - split this patch out from a big patch in v1.
      (suggested by Wei Liu)
    - change 'CAT_INFO'/'MBA_INFO' to 'CAT' and 'MBA. Also the libxl structure
      name 'cat_info'/'mba_info' is changed to 'cat'/'mba'.
      (suggested by Chao Peng)
    - call 'libxl_psr_hw_info_list_free' in 'libxl_psr_cat_get_info' to free
      allocated resources.
      (suggested by Chao Peng)
Patch 11:
    - split out this patch from a big patch in v1.
      (suggested by Wei Liu)
    - change 'MBA_INFO' to 'MBA'. Also, change 'mba_info' to 'mba'.
      (suggested by Chao Peng)
Patch 13:
    - change 'CAT_INFO'/'MBA_INFO' to 'CAT'/'MBA'. The related structure names
      are changed too.
      (suggested by Chao Peng)
Patch 15:
    - state the value type shown by 'psr-mba-show'. For linear mode,
      it shows decimal value. For non-linear mode, it shows hexadecimal
      value.
      (suggested by Chao Peng)

Yi Sun (15):
  docs: create Memory Bandwidth Allocation (MBA) feature document
  Rename PSR sysctl/domctl interfaces and xsm policy to make them be
    general
  x86: rename 'cbm_type' to 'psr_val_type' to make it general
  x86: implement data structure and CPU init flow for MBA
  x86: implement get hw info flow for MBA
  x86: implement get value interface for MBA
  x86: implement set value flow for MBA
  tools: create general interfaces to support psr allocation features
  tools: implement the new libxc get hw info interface
  tools: implement the new libxl get hw info interface
  tools: implement the new xl get hw info interface
  tools: rename 'xc_psr_cat_type' to 'xc_psr_val_type'
  tools: implement new generic get value interface and MBA get value
    command
  tools: implement new generic set value interface and MBA set value
    command
  docs: add MBA description in docs

 docs/features/intel_psr_mba.pandoc  | 256 +++++++++++++++++++++++++
 docs/man/xl.pod.1.in                |  34 ++++
 docs/misc/xl-psr.markdown           |  63 +++++++
 tools/flask/policy/modules/dom0.te  |   4 +-
 tools/libxc/include/xenctrl.h       |  47 +++--
 tools/libxc/xc_psr.c                |  88 ++++++---
 tools/libxl/libxl.h                 |  35 +++-
 tools/libxl/libxl_psr.c             | 229 ++++++++++++++++++----
 tools/libxl/libxl_types.idl         |  22 +++
 tools/xl/xl.h                       |   2 +
 tools/xl/xl_cmdtable.c              |  12 ++
 tools/xl/xl_psr.c                   | 279 +++++++++++++++++++++------
 xen/arch/x86/domctl.c               |  65 ++++---
 xen/arch/x86/psr.c                  | 366 +++++++++++++++++++++++++++---------
 xen/arch/x86/sysctl.c               |  47 +++--
 xen/include/asm-x86/msr-index.h     |   1 +
 xen/include/asm-x86/psr.h           |  22 ++-
 xen/include/public/domctl.h         |  14 +-
 xen/include/public/sysctl.h         |  20 +-
 xen/xsm/flask/hooks.c               |   8 +-
 xen/xsm/flask/policy/access_vectors |   8 +-
 21 files changed, 1318 insertions(+), 304 deletions(-)
 create mode 100644 docs/features/intel_psr_mba.pandoc

-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.