All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v12 00/23] Enable L2 Cache Allocation Technology & Refactor psr.c
@ 2017-06-14  1:12 Yi Sun
  2017-06-14  1:12 ` [PATCH v12 01/23] docs: create Cache Allocation Technology (CAT) and Code and Data Prioritization (CDP) feature document Yi Sun
                   ` (22 more replies)
  0 siblings, 23 replies; 67+ messages in thread
From: Yi Sun @ 2017-06-14  1:12 UTC (permalink / raw)
  To: xen-devel
  Cc: kevin.tian, wei.liu2, andrew.cooper3, dario.faggioli, he.chen,
	ian.jackson, Yi Sun, mengxu, jbeulich, chao.p.peng, roger.pau

Hi all,

We plan to bring a new PSR (Platform Shared Resource) feature called
Intel L2 Cache Allocation Technology (L2 CAT) to Xen. It has been enabled
in Linux Kernel.

Besides the L2 CAT implementaion, we refactor the psr.c to make it more
flexible and easily to extend to add new features. We abstract the general
operations of all features and encapsulate them into a structure. Then,
the development of new feature is simple to mainly implement these callback
functions.

The patch set can be found at:
https://github.com/yisun-git/xen.git l2_cat_v12

---
Acked and Reviewed list before V12:

a - Acked-by
r - Reviewed-by

  r  patch 1  - docs: create Cache Allocation Technology (CAT) and Code and
                Data Prioritization (CDP) feature document
  a  patch 2  - x86: move cpuid_count_leaf from cpuid.c to processor.h.
  ar patch 3  - x86: refactor psr: remove L3 CAT/CDP codes.
  r  patch 6  - x86: refactor psr: L3 CAT: implement get hw info flow.
  r  patch 18 - x86: L2 CAT: implement get value flow.
  r  patch 19 - x86: L2 CAT: implement set value flow.
  a  patch 20 - tools: L2 CAT: support get HW info for L2 CAT.
  a  patch 21 - tools: L2 CAT: support show cbm for L2 CAT.
  a  patch 22 - tools: L2 CAT: support set cbm for L2 CAT.
  a  patch 23 - docs: add L2 CAT description in docs.

---
V12 change list:

Patch 4:
    - add comment for 'feat_init'.
      (suggested by Jan Beulich)
    - use 'ARRAY_SIZE()' to check array boundary.
      (suggested by Jan Beulich)
    - use 'XENLOG_WARNING' for error message.
      (suggested by Jan Beulich)
    - move 'type[]' assignment for feat_props object into its delcaration
      to make the object be 'const'.
      (suggested by Jan Beulich)
    - remove "L3" and "L2" indication in printk.
      (suggested by Jan Beulich)
    - move position of 'ref_lock' definition.
Patch 5:
    - fix coding style issue.
      (suggested by Jan Beulich)
    - in 'get_max_cos_max', invert the condition and dropping 'continue'.
      (suggested by Jan Beulich)
    - modify 'psr_assoc_cos' to directly return 'reg' value.
      (suggested by Jan Beulich)
    - modify code style.
      (suggested by Jan Beulich)
    - do not break domain creation if 'psr_cos_ids' allocation fails.
      (suggested by Jan Beulich)
Patch 6:
    - use 'ASSERT_UNREACHABLE()' to record bug.
      (suggested by Jan Beulich)
Patch 7:
    - remove 'psr_get_feat_and_type' and implement its functionality in
      'psr_get_val'.
    - use 'ASSERT_UNREACHABLE' to record error.
      (suggested by Jan Beulich)
    - return success only if the 'val' is set in 'psr_get_val'.
      (suggested by Jan Beulich)
Patch 8:
    - remove the memebers position changes in 'psr_socket_info'.
      (suggested by Jan Beulich)
    - rename 'dom_ids' to 'dom_set'.
      (suggested by Jan Beulich)
    - call 'bitmap_zero' to clear bitmap.
      (suggested by Jan Beulich)
    - combine two if()-s in 'psr_ctxt_switch_to' and add comment.
      (suggested by Jan Beulich)
    - remove redundant check in 'psr_get_val'.
      (suggested by Jan Beulich)
    - use 'domain_lock()' to protect 'psr_cos_ids' so that the codes do not
      depend on 'domctl_lock'.
      (suggested by Jan Beulich)
    - adjust codes to avoid cast in 'psr_set_val'.
      (suggested by Jan Beulich)
    - adjust codes to avoid duplication of error paths in 'psr_set_val'.
      (suggested by Jan Beulich)
    - clear the domain bit anyway in 'psr_free_cos'.
      (suggested by Jan Beulich)
    - use the default cos id when getting old_cos in 'psr_set_val'.
Patch 9:
    - use 'ARRAY_SIZE' to calculate array boundary.
      (suggested by Jan Beulich)
    - use 'ASSERT_UNREACHABLE()' to record bug and return error code if feat
      exist but props does not exist.
      (suggested by Jan Beulich)
    - return 0 only when value is set in 'insert_val_into_array'.
      (suggested by Jan Beulich)
Patch 10:
    - use 'ARRAY_SIZE' to calculate array boundary.
      (suggested by Jan Beulich)
    - move same type variables declaration to one line.
      (suggested by Jan Beulich)
    - use 'ASSERT_UNREACHABLE()' to record bug and return error code if feat
      exists but props does not exist.
      (suggested by Jan Beulich)
    - move 'i' definition into the loop to limit its scope.
      (suggested by Jan Beulich)
Patch 11:
    - use 'ASSERT_UNREACHABLE()' to record bug and return error code if feat
      exists but props does not exist.
      (suggested by Jan Beulich)
    - declare same type vairables in one line.
      (suggested by Jan Beulich)
    - use 'ARRAY_SIZE' to calculate array boundary.
      (suggested by Jan Beulich)
Patch 12:
    - declare same type varaibles in one line.
      (suggested by Jan Beulich)
    - replace 'feat_type' to 'props' in 'struct cos_write_info'.
      (suggested by Jan Beulich)
    - assign the 'cos_num' to a local variable.
      (suggested by Jan Beulich)
    - use 'ASSERT_UNREACHABLE()' to record bug and return error code if feat
      exists but props does not exist.
      (suggested by Jan Beulich)
Patch 13:
    - move 'type[]' assignment into l3_cdp_props declaration to make it be
      'const'.
      (suggested by Jan Beulich)
    - remove "L2 CAT" indication in printk.
      (suggested by Jan Beulich)
    - fix coding style issue.
      (suggested by Jan Beulich)
    - change 'val' type to uint64_t.
      (suggested by Jan Beulich)
    - use 1ull.
      (suggested by Jan Beulich)
    - restore mask(0) MSR to default value.
      (suggested by Jan Beulich)
Patch 14:
    - remove input parameter 'info' in 'psr_cbm_type_to_feat_type'. Use
      'feat_props' array to check.
      (suggested by Jan Beulich)
Patch 15:
    - add comment to explain how to deal with the case that user set new val
      for both DATA and CODE at same time.
    - add parameter for 'psr_cbm_type_to_feat_type' to return the feature type
      according to it.
    - use the feature type returned by 'psr_cbm_type_to_feat_type' to check
      if we need insert the new value into all items of the feature value array.
    - use conditional expression for wrmsrl.
      (suggested by Jan Beulich)
Patch 16:
    - move 'type[]' assignment into l2_cat_props declaration to make it be
      'const'.
      (suggested by Jan Beulich)
    - add "L2 CAT" indicator in printk.
      (suggested by Jan Beulich)
    - restore mask(0) MSR to default value.
      (suggested by Jan Beulich)

Yi Sun (23):
  docs: create Cache Allocation Technology (CAT) and Code and Data
    Prioritization (CDP) feature document
  x86: move cpuid_count_leaf from cpuid.c to processor.h.
  x86: refactor psr: remove L3 CAT/CDP codes.
  x86: refactor psr: L3 CAT: implement main data structures, CPU init
    and free flows.
  x86: refactor psr: L3 CAT: implement Domain init/free and schedule
    flows.
  x86: refactor psr: L3 CAT: implement get hw info flow.
  x86: refactor psr: L3 CAT: implement get value flow.
  x86: refactor psr: L3 CAT: set value: implement framework.
  x86: refactor psr: L3 CAT: set value: assemble features value array.
  x86: refactor psr: L3 CAT: set value: implement cos finding flow.
  x86: refactor psr: L3 CAT: set value: implement cos id picking flow.
  x86: refactor psr: L3 CAT: set value: implement write msr flow.
  x86: refactor psr: CDP: implement CPU init flow.
  x86: refactor psr: CDP: implement get hw info flow.
  x86: refactor psr: CDP: implement set value callback function.
  x86: L2 CAT: implement CPU init flow.
  x86: L2 CAT: implement get hw info flow.
  x86: L2 CAT: implement get value flow.
  x86: L2 CAT: implement set value flow.
  tools: L2 CAT: support get HW info for L2 CAT.
  tools: L2 CAT: support show cbm for L2 CAT.
  tools: L2 CAT: support set cbm for L2 CAT.
  docs: add L2 CAT description in docs.

 docs/features/intel_psr_cat_cdp.pandoc |  461 +++++++++++
 docs/man/xl.pod.1.in                   |   25 +-
 docs/misc/xl-psr.markdown              |   18 +-
 tools/libxc/include/xenctrl.h          |    7 +-
 tools/libxc/xc_psr.c                   |   45 +-
 tools/libxl/libxl.h                    |    9 +
 tools/libxl/libxl_psr.c                |   28 +-
 tools/libxl/libxl_types.idl            |    1 +
 tools/xl/xl_cmdtable.c                 |    6 +-
 tools/xl/xl_psr.c                      |  168 ++--
 xen/arch/x86/cpuid.c                   |    6 -
 xen/arch/x86/domain.c                  |    3 +-
 xen/arch/x86/domctl.c                  |   51 +-
 xen/arch/x86/psr.c                     | 1411 ++++++++++++++++++++++++--------
 xen/arch/x86/sysctl.c                  |   38 +-
 xen/include/asm-x86/msr-index.h        |    1 +
 xen/include/asm-x86/processor.h        |    7 +
 xen/include/asm-x86/psr.h              |   28 +-
 xen/include/public/domctl.h            |    2 +
 xen/include/public/sysctl.h            |    3 +-
 20 files changed, 1876 insertions(+), 442 deletions(-)
 create mode 100644 docs/features/intel_psr_cat_cdp.pandoc

-- 
1.9.1


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

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

end of thread, other threads:[~2017-07-05  1:46 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-14  1:12 [PATCH v12 00/23] Enable L2 Cache Allocation Technology & Refactor psr.c Yi Sun
2017-06-14  1:12 ` [PATCH v12 01/23] docs: create Cache Allocation Technology (CAT) and Code and Data Prioritization (CDP) feature document Yi Sun
2017-06-14  1:12 ` [PATCH v12 02/23] x86: move cpuid_count_leaf from cpuid.c to processor.h Yi Sun
2017-06-14  1:12 ` [PATCH v12 03/23] x86: refactor psr: remove L3 CAT/CDP codes Yi Sun
2017-06-14  1:12 ` [PATCH v12 04/23] x86: refactor psr: L3 CAT: implement main data structures, CPU init and free flows Yi Sun
2017-06-28  7:12   ` Jan Beulich
2017-06-28  9:07     ` Yi Sun
2017-06-14  1:12 ` [PATCH v12 05/23] x86: refactor psr: L3 CAT: implement Domain init/free and schedule flows Yi Sun
2017-06-28  7:13   ` Jan Beulich
2017-06-14  1:12 ` [PATCH v12 06/23] x86: refactor psr: L3 CAT: implement get hw info flow Yi Sun
2017-06-14  1:12 ` [PATCH v12 07/23] x86: refactor psr: L3 CAT: implement get value flow Yi Sun
2017-06-28  7:14   ` Jan Beulich
2017-06-14  1:12 ` [PATCH v12 08/23] x86: refactor psr: L3 CAT: set value: implement framework Yi Sun
2017-06-28  7:14   ` Jan Beulich
2017-06-28  9:09     ` Yi Sun
2017-06-28 11:43       ` Jan Beulich
2017-06-29  5:12         ` Yi Sun
2017-06-29  6:24           ` Jan Beulich
2017-06-29  7:21             ` Yi Sun
2017-06-14  1:12 ` [PATCH v12 09/23] x86: refactor psr: L3 CAT: set value: assemble features value array Yi Sun
2017-06-29 17:56   ` Jan Beulich
2017-06-14  1:12 ` [PATCH v12 10/23] x86: refactor psr: L3 CAT: set value: implement cos finding flow Yi Sun
2017-06-29 17:57   ` Jan Beulich
2017-06-14  1:12 ` [PATCH v12 11/23] x86: refactor psr: L3 CAT: set value: implement cos id picking flow Yi Sun
2017-06-29 17:59   ` Jan Beulich
2017-06-14  1:12 ` [PATCH v12 12/23] x86: refactor psr: L3 CAT: set value: implement write msr flow Yi Sun
2017-06-29 18:00   ` Jan Beulich
2017-06-30  5:45     ` Yi Sun
2017-06-30  6:45       ` Jan Beulich
2017-06-30  7:08         ` Yi Sun
2017-06-14  1:12 ` [PATCH v12 13/23] x86: refactor psr: CDP: implement CPU init flow Yi Sun
2017-06-30  6:40   ` Jan Beulich
2017-06-30  6:59     ` Yi Sun
2017-06-30  7:33       ` Jan Beulich
2017-06-30  8:04         ` Yi Sun
2017-06-30  9:18           ` Jan Beulich
2017-07-04  1:40             ` Yi Sun
2017-07-04  7:28               ` Jan Beulich
2017-07-05  1:45                 ` Yi Sun
2017-06-14  1:12 ` [PATCH v12 14/23] x86: refactor psr: CDP: implement get hw info flow Yi Sun
2017-06-30  6:41   ` Jan Beulich
2017-06-14  1:12 ` [PATCH v12 15/23] x86: refactor psr: CDP: implement set value callback function Yi Sun
2017-06-30  6:42   ` Jan Beulich
2017-06-30  7:22     ` Yi Sun
2017-06-30  8:54       ` Yi Sun
2017-06-30  9:33         ` Jan Beulich
2017-06-30 11:29           ` Yi Sun
2017-06-30 12:02             ` Jan Beulich
2017-07-03  6:33               ` Yi Sun
2017-07-03  7:01                 ` Jan Beulich
2017-07-03  8:40                   ` Yi Sun
2017-07-03  9:18                     ` Jan Beulich
2017-07-03 12:52                       ` Yi Sun
2017-07-03 13:02                         ` Jan Beulich
2017-06-14  1:12 ` [PATCH v12 16/23] x86: L2 CAT: implement CPU init flow Yi Sun
2017-06-30  6:58   ` Jan Beulich
2017-06-30  7:27     ` Yi Sun
2017-06-30  7:36       ` Jan Beulich
2017-06-30  8:05         ` Yi Sun
2017-06-14  1:12 ` [PATCH v12 17/23] x86: L2 CAT: implement get hw info flow Yi Sun
2017-06-30  6:59   ` Jan Beulich
2017-06-14  1:12 ` [PATCH v12 18/23] x86: L2 CAT: implement get value flow Yi Sun
2017-06-14  1:12 ` [PATCH v12 19/23] x86: L2 CAT: implement set " Yi Sun
2017-06-14  1:12 ` [PATCH v12 20/23] tools: L2 CAT: support get HW info for L2 CAT Yi Sun
2017-06-14  1:12 ` [PATCH v12 21/23] tools: L2 CAT: support show cbm " Yi Sun
2017-06-14  1:12 ` [PATCH v12 22/23] tools: L2 CAT: support set " Yi Sun
2017-06-14  1:12 ` [PATCH v12 23/23] docs: add L2 CAT description in docs Yi Sun

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.