All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: He Chen <he.chen@linux.intel.com>, xen-devel@lists.xenproject.org
Cc: wei.liu2@citrix.com, ian.campbell@citrix.com,
	stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com,
	jbeulich@suse.com, chao.p.peng@linux.intel.com, keir@xen.org
Subject: Re: [PATCH v4 1/4] x86: Support enable CDP by boot parameter and add get CDP status
Date: Thu, 17 Sep 2015 11:20:58 +0100	[thread overview]
Message-ID: <55FA940A.507@citrix.com> (raw)
In-Reply-To: <1442482536-12024-2-git-send-email-he.chen@linux.intel.com>

On 17/09/15 10:35, He Chen wrote:
> Add boot parameter `psr=cdp` to enable CDP at boot time.
> Intel Code/Data Prioritization(CDP) feature is based on CAT. Note that
> cos_max would be half when CDP is on. struct psr_cat_cbm is extended to
> support CDP operation. Extend psr_get_cat_l3_info sysctl to get CDP
> status.
>
> Signed-off-by: He Chen <he.chen@linux.intel.com>
> ---
>  docs/misc/xen-command-line.markdown | 11 ++++-
>  xen/arch/x86/psr.c                  | 84 ++++++++++++++++++++++++++++++-------
>  xen/arch/x86/sysctl.c               |  5 ++-
>  xen/include/asm-x86/msr-index.h     |  3 ++
>  xen/include/asm-x86/psr.h           | 11 ++++-
>  xen/include/public/sysctl.h         |  4 +-
>  6 files changed, 98 insertions(+), 20 deletions(-)
>
> diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
> index a2e427c..d92e323 100644
> --- a/docs/misc/xen-command-line.markdown
> +++ b/docs/misc/xen-command-line.markdown
> @@ -1165,9 +1165,9 @@ This option can be specified more than once (up to 8 times at present).
>  > `= <integer>`
>  
>  ### psr (Intel)
> -> `= List of ( cmt:<boolean> | rmid_max:<integer> | cat:<boolean> | cos_max:<integer> )`
> +> `= List of ( cmt:<boolean> | rmid_max:<integer> | cat:<boolean> | cos_max:<integer> | cdp:<boolean> )`
>  
> -> Default: `psr=cmt:0,rmid_max:255,cat:0,cos_max:255`
> +> Default: `psr=cmt:0,rmid_max:255,cat:0,cos_max:255,cdp:0`
>  
>  Platform Shared Resource(PSR) Services.  Intel Haswell and later server
>  platforms offer information about the sharing of resources.
> @@ -1197,6 +1197,13 @@ The following resources are available:
>    the cache allocation.
>    * `cat` instructs Xen to enable/disable Cache Allocation Technology.
>    * `cos_max` indicates the max value for COS ID.
> +* Code and Data Prioritization Technology (Broadwell and later). Information
> +  regarding the code cache and the data cache allocation. CDP is based on CAT.
> +  * `cdp` instructs Xen to enable/disable Code and Data Prioritization. Note
> +    that `cos_max` of CDP is a little different from `cos_max` of CAT. With
> +    CDP, one COS will corespond two CBMs other than one with CAT, due to the
> +    sum of CBMs is fixed, that means actual `cos_max` in use will automatically
> +    reduce to half when CDP is enabled.
>  
>  ### reboot
>  > `= t[riple] | k[bd] | a[cpi] | p[ci] | P[ower] | e[fi] | n[o] [, [w]arm | [c]old]`
> diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c
> index c0daa2e..e44ed8b 100644
> --- a/xen/arch/x86/psr.c
> +++ b/xen/arch/x86/psr.c
> @@ -21,9 +21,16 @@
>  
>  #define PSR_CMT        (1<<0)
>  #define PSR_CAT        (1<<1)
> +#define PSR_CDP        (1<<2)
>  
>  struct psr_cat_cbm {
> -    uint64_t cbm;
> +    union {
> +        uint64_t cbm;
> +        struct {
> +            uint64_t code;
> +            uint64_t data;
> +        };
> +    } u;

You can also drop this u which will further reduce the diff later in the
patch.

With this change, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

  reply	other threads:[~2015-09-17 10:21 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17  9:35 [PATCH v4 0/4] detect and initialize CDP (Code/Data Prioritization) feature He Chen
2015-09-17  9:35 ` [PATCH v4 1/4] x86: Support enable CDP by boot parameter and add get CDP status He Chen
2015-09-17 10:20   ` Andrew Cooper [this message]
2015-09-24 15:57   ` Jan Beulich
2015-09-17  9:35 ` [PATCH v4 2/4] x86: add domctl cmd to set/get CDP code/data CBM He Chen
2015-09-17 10:25   ` Andrew Cooper
2015-09-17  9:35 ` [PATCH v4 3/4] tools: add tools support for Intel CDP He Chen
2015-09-17 10:38   ` Andrew Cooper
2015-09-24 10:56     ` Ian Campbell
2015-09-24 10:57     ` Ian Campbell
2015-09-24 11:12       ` Andrew Cooper
2015-09-24 11:00   ` Ian Campbell
2015-09-24 11:50     ` Jan Beulich
2015-09-24 12:07       ` Ian Campbell
2015-09-24 12:20         ` Jan Beulich
2015-09-24 12:31           ` Ian Campbell
2015-09-24 11:07   ` Ian Campbell
2015-09-24 11:22     ` Ian Campbell
2015-09-25  9:04       ` He Chen
2015-09-25  9:19         ` Ian Campbell
2015-09-25  8:43     ` He Chen
2015-09-25  9:18       ` Ian Campbell
2015-09-25  9:53         ` He Chen
2015-09-25 10:30           ` Ian Campbell
2015-09-17  9:35 ` [PATCH v4 4/4] docs: add document to introduce CDP command He Chen
2015-09-24 11:22   ` Ian Campbell
2015-09-24 11:53     ` Jan Beulich
2015-09-25  9:29     ` He Chen
2015-09-25  9:58       ` Ian Campbell
2015-09-25 10:16         ` He Chen
2015-09-25 10:38           ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55FA940A.507@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=he.chen@linux.intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.