From: Dario Faggioli <dario.faggioli@citrix.com>
To: Chao Peng <chao.p.peng@linux.intel.com>
Cc: keir@xen.org, Ian.Campbell@citrix.com,
stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org,
will.auld@intel.com, JBeulich@suse.com, wei.liu2@citrix.com,
dgdegra@tycho.nsa.gov
Subject: Re: [PATCH v7 07/14] x86: dynamically get/set CBM for a domain
Date: Thu, 14 May 2015 11:19:17 +0200 [thread overview]
Message-ID: <1431595157.2978.153.camel@citrix.com> (raw)
In-Reply-To: <1431075415-21917-8-git-send-email-chao.p.peng@linux.intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 1293 bytes --]
On Fri, 2015-05-08 at 16:56 +0800, Chao Peng wrote:
> For CAT, COS is maintained in hypervisor only while CBM is exposed to
> user space directly to allow getting/setting domain's cache capacity.
> For each specified CBM, hypervisor will either use a existed COS which
> has the same CBM or allocate a new one if the same CBM is not found. If
> the allocation fails because of no enough COS available then error is
> returned. The getting/setting are always operated on a specified socket.
> For multiple sockets system, the interface may be called several times.
>
> Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Just, one minor thing, only if you end up resending...
> diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c
> index 1feb2f6..385807b 100644
> --- a/xen/arch/x86/psr.c
> +++ b/xen/arch/x86/psr.c
> @@ -49,6 +49,14 @@ static unsigned int opt_cos_max = 255;
> static uint64_t rmid_mask;
> static DEFINE_PER_CPU(struct psr_assoc, psr_assoc);
>
> +static unsigned int get_socket_cpu(unsigned int socket)
> +{
> + if ( socket < nr_sockets )
> + return cpumask_any(socket_to_cpumask[socket]);
> +
... What about
if ( likely(socket < nr_sockets) )
Regards,
Dario
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-05-14 9:19 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 8:56 [PATCH v7 00/14] enable Cache Allocation Technology (CAT) for VMs Chao Peng
2015-05-08 8:56 ` [PATCH v7 01/14] x86: add socket_to_cpumask Chao Peng
2015-05-18 13:21 ` Jan Beulich
2015-05-19 6:12 ` Chao Peng
2015-05-19 6:28 ` Jan Beulich
2015-05-19 6:47 ` Chao Peng
2015-05-19 6:52 ` Jan Beulich
2015-05-19 7:10 ` Chao Peng
2015-05-19 7:31 ` Jan Beulich
2015-05-19 9:51 ` Chao Peng
2015-05-19 10:18 ` Jan Beulich
2015-05-20 3:13 ` Chao Peng
2015-05-20 9:00 ` Jan Beulich
2015-05-08 8:56 ` [PATCH v7 02/14] x86: improve psr scheduling code Chao Peng
2015-05-08 10:20 ` Jan Beulich
2015-05-11 1:35 ` Chao Peng
2015-05-08 8:56 ` [PATCH v7 03/14] x86: detect and initialize Intel CAT feature Chao Peng
2015-05-18 13:33 ` Jan Beulich
2015-05-19 7:40 ` Chao Peng
2015-05-19 8:42 ` Jan Beulich
2015-05-19 8:46 ` Jan Beulich
2015-05-19 9:33 ` Chao Peng
2015-05-19 10:22 ` Jan Beulich
2015-05-20 3:21 ` Chao Peng
2015-05-20 9:06 ` Jan Beulich
2015-05-20 9:26 ` Chao Peng
2015-05-08 8:56 ` [PATCH v7 04/14] x86: maintain COS to CBM mapping for each socket Chao Peng
2015-05-18 13:35 ` Jan Beulich
2015-05-19 7:41 ` Chao Peng
2015-05-08 8:56 ` [PATCH v7 05/14] x86: add COS information for each domain Chao Peng
2015-05-08 8:56 ` [PATCH v7 06/14] x86: expose CBM length and COS number information Chao Peng
2015-05-08 8:56 ` [PATCH v7 07/14] x86: dynamically get/set CBM for a domain Chao Peng
2015-05-14 9:19 ` Dario Faggioli [this message]
2015-05-15 1:35 ` Chao Peng
2015-05-18 13:45 ` Jan Beulich
2015-05-08 8:56 ` [PATCH v7 08/14] x86: add scheduling support for Intel CAT Chao Peng
2015-05-08 8:56 ` [PATCH v7 09/14] xsm: add CAT related xsm policies Chao Peng
2015-05-08 8:56 ` [PATCH v7 10/14] tools/libxl: minor name changes for CMT commands Chao Peng
2015-05-08 8:56 ` [PATCH v7 11/14] tools/libxl: add command to show PSR hardware info Chao Peng
2015-05-08 8:56 ` [PATCH v7 12/14] tools/libxl: introduce some socket helpers Chao Peng
2015-05-08 8:56 ` [PATCH v7 13/14] tools: add tools support for Intel CAT Chao Peng
2015-05-08 13:38 ` Ian Campbell
2015-05-08 8:56 ` [PATCH v7 14/14] docs: add xl-psr.markdown Chao Peng
2015-05-08 13:39 ` Ian Campbell
2015-05-08 13:41 ` [PATCH v7 00/14] enable Cache Allocation Technology (CAT) for VMs Ian Campbell
2015-05-08 13:48 ` Jan Beulich
2015-05-08 14:11 ` Ian Campbell
2015-05-11 1:37 ` Chao Peng
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=1431595157.2978.153.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=chao.p.peng@linux.intel.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=keir@xen.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=will.auld@intel.com \
--cc=xen-devel@lists.xen.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.