From: Ian Campbell <ian.campbell@citrix.com>
To: He Chen <he.chen@linux.intel.com>, xen-devel@lists.xenproject.org
Cc: wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com,
andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
jbeulich@suse.com, chao.p.peng@linux.intel.com, keir@xen.org
Subject: Re: [PATCH v6 3/3] tools & docs: add tools and docs support for Intel CDP
Date: Thu, 8 Oct 2015 11:48:41 +0100 [thread overview]
Message-ID: <1444301321.1410.144.camel@citrix.com> (raw)
In-Reply-To: <1444274637-6104-4-git-send-email-he.chen@linux.intel.com>
On Thu, 2015-10-08 at 11:23 +0800, He Chen wrote:
> This is the xl/xc changes to support Intel Code/Data Prioritization.
> CAT xl commands to set/get CBMs are extended to support CDP.
> Add new CDP options with CAT commands in xl interface man page.
> Add description of CDP in xl-psr.markdown.
>
> Signed-off-by: He Chen <he.chen@linux.intel.com>
> ---
> Changes in v6:
> * separate CBM headings in the output of xl psr-cat-show
> * revert the numbers of SDM chapter in xl-psr.markdown
> * XC_PSR_CAT_L3_CODE (DATA) => XC_PSR_CAT_L3_CBM_CODE (DATA)
In this comment on v5 I mentioned that it was more important for libxl than
libxc, I'm afraid that what I was trying to say was that the libxl names
needed changing as well. Sorry for not clearly saying so.
> +For more detailed information please refer to Intel SDM chapter
> +"17.15 - Platform Shared Resource Control: Cache Allocation Technology".
Looks like you missed deleting this section number.
> @@ -8454,20 +8457,30 @@ static void psr_cat_print_one_domain_cbm(uint32_t domid, uint32_t socketid)
> printf("%5d%25s", domid, domain_name);
> free(domain_name);
>
> - if (!libxl_psr_cat_get_cbm(ctx, domid, LIBXL_PSR_CBM_TYPE_L3_CBM,
> - socketid, &cbm))
> - printf("%#16"PRIx64, cbm);
> + if (!cdp_enabled) {
> + if (!libxl_psr_cat_get_cbm(ctx, domid, LIBXL_PSR_CBM_TYPE_L3_CBM,
> + socketid, &cbm))
> + printf("%#16"PRIx64, cbm);
> + } else {
> + if (!libxl_psr_cat_get_cbm(ctx, domid, LIBXL_PSR_CBM_TYPE_L3_CODE,
> + socketid, &cbm))
> + printf("%#16"PRIx64, cbm);
If this libxl_psr_cat_get_cbm(CODE) fails for some reason then this prints
nothing, meaning that the following libxl_psr_cat_get_cbm(DATA) will
actually print into the code column.
I think you should add an:
else
printf("%16s", "error")
(or perhaps "%-16s" for alignment, please check which looks best and
decide)
Please also refactor all three of these nearly identical:
if (!libxl_psr_cat_get_cbm(ctx, domid, LIBXL_PSR_CBM_TYPE_L3_???,
socketid, &cbm))
printf("%#16"PRIx64, cbm);
blocks into a helper which takes the PSR_CBM_TYPE as an argument and prints
either the result or the error string with the appropriate width.
> + if (!libxl_psr_cat_get_cbm(ctx, domid, LIBXL_PSR_CBM_TYPE_L3_DATA,
> + socketid, &cbm))
> + printf("%#16"PRIx64, cbm);
> + }
>
prev parent reply other threads:[~2015-10-08 10:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-08 3:23 [PATCH v6 0/3] detect and initialize CDP (Code/Data Prioritization) feature He Chen
2015-10-08 3:23 ` [PATCH v6 1/3] x86: Support enable CDP by boot parameter and add get CDP status He Chen
2015-10-10 6:04 ` Chao Peng
2015-10-08 3:23 ` [PATCH v6 2/3] x86: add domctl cmd to set/get CDP code/data CBM He Chen
2015-10-10 6:11 ` Chao Peng
2015-10-08 3:23 ` [PATCH v6 3/3] tools & docs: add tools and docs support for Intel CDP He Chen
2015-10-08 10:34 ` Ian Jackson
2015-10-08 10:48 ` Ian Campbell [this message]
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=1444301321.1410.144.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=chao.p.peng@linux.intel.com \
--cc=he.chen@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).