All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: ian.jackson@eu.citrix.com, Ian Campbell <Ian.Campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v6 03/18] xl / libxl: push VCPU affinity pinning down to libxl
Date: Tue, 10 Jun 2014 17:59:01 +0200	[thread overview]
Message-ID: <1402415941.16827.64.camel@Solace> (raw)
In-Reply-To: <20140610140647.GM11959@zion.uk.xensource.com>


[-- Attachment #1.1: Type: text/plain, Size: 3150 bytes --]

On mar, 2014-06-10 at 15:06 +0100, Wei Liu wrote:
> On Tue, Jun 10, 2014 at 03:01:00PM +0100, Ian Campbell wrote:
> > On Mon, 2014-06-09 at 13:43 +0100, Wei Liu wrote:
> > > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> > > index 0ea0464..4765fb6 100644
> > > --- a/tools/libxl/libxl_types.idl
> > > +++ b/tools/libxl/libxl_types.idl
> > > @@ -305,6 +305,7 @@ libxl_domain_build_info =
> > > Struct("domain_build_info",[
> > >      ("avail_vcpus",     libxl_bitmap),
> > >      ("cpumap",          libxl_bitmap),
> > >      ("nodemap",         libxl_bitmap),
> > > +    ("vcpu_affinity",   Array(libxl_bitmap, "num_vcpumaps")),
> > 
> > Looking at one of Dario's patches I became confused about how this new
> > field relates to the existing cpumap field.
> > 
> > Am I right that the new field is just a per-vcpu version of the old
> > (which only allows you to set the affinity of every vcpu together)?
> > 
> 
> Yes, you're right. The old field denotes the PCPUs this domain is
> allowed to run on. The new array specifies the PCPUs each VCPU can run
> on.
> 
Well, there's no "new" and "old". I mean, as can clearly be seen in the
hunk above, 'cpumap' is still there, and vcpu_affinity is being added.

Fact is, considering how xl parses XXX in "cpus=XXX", only one between
'cpumap' and 'vcpu_affinity' will contain actual information.

With my series on top of this one (or vice versa), we'll have:

 ("cpumap",         libxl_bitmap)
 ("cpumap_soft",    libxl_bitmap)
 ("vcpu_affinity",  Array(libxl_bitmap, "num_vcpumaps"))

which is missing the soft affinity equivalent of 'vcpu_affinity'.
meaning that, either me or Wei, when rebasing on top of the other series
which went in first, will have to add it, meaning we'll end up with the
following:

 ("cpumap",              libxl_bitmap)
 ("cpumap_soft",         libxl_bitmap)
 ("vcpu_hard_affinity",  Array(libxl_bitmap, "num_vcpumaps"))
 ("vcpu_soft_affinity",  Array(libxl_bitmap, "num_vcpumaps"))

which is a lot of fields, and not particularly easy to understand, IMHO.

> > Can this relationship be mentioned in the commit message and/or comments
> > please.
> > 
I think we could go farther than that... way farther. I mean, "cpumap"
contains the vcpu affinity to be applied to all the vcpus of the domain,
if the config file was something like "cpus="1,3-6". "vcpu_affinity"
contains a cpumap for each vcpu, if the config file was something like
"cpus=["1", "5"] (and all this repeated for soft affinity, with my
series).

Can't we kill "cpumap" (and "cpumap_soft" too, in my series) and use
"vcpu_affinity" (i.e., "vcpu_hard_affinity" and "vcpu_soft_affinity"
after my series) only? What would happen is, in case we find
"cpus="4-5", we set all the bitmaps of "vcpu_hard_affinity" to "4-5".

What do you think?

Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2014-06-10 15:59 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09 12:43 [PATCH v6 00/18] libxl: JSON infrastructure, fixes and prerequisite patches for new API Wei Liu
2014-06-09 12:43 ` [PATCH v6 01/18] libxl: make cpupool_qualifier_to_cpupoolid a library function Wei Liu
2014-06-09 12:43 ` [PATCH v6 02/18] xl / libxl: push parsing of SSID and CPU pool ID down to libxl Wei Liu
2014-06-10 12:57   ` Ian Campbell
2014-06-10 14:16     ` Wei Liu
2014-06-09 12:43 ` [PATCH v6 03/18] xl / libxl: push VCPU affinity pinning " Wei Liu
2014-06-09 12:53   ` Wei Liu
2014-06-10  6:59   ` Dario Faggioli
2014-06-10  8:09     ` Wei Liu
2014-06-10 13:01       ` Ian Campbell
2014-06-10 13:09         ` Dario Faggioli
2014-06-10 13:46           ` Wei Liu
2014-06-10 14:01   ` Ian Campbell
2014-06-10 14:06     ` Wei Liu
2014-06-10 15:59       ` Dario Faggioli [this message]
2014-06-09 12:43 ` [PATCH v6 04/18] libxl: libxl_uuid_copy now takes a ctx argument Wei Liu
2014-06-10 13:05   ` Ian Campbell
2014-06-10 13:55     ` Wei Liu
2014-06-09 12:43 ` [PATCH v6 05/18] xl: remove parsing of "vncviewer" option in xl domain config file Wei Liu
2014-06-09 12:43 ` [PATCH v6 06/18] libxl: fix JSON generator for uint64_t Wei Liu
2014-06-09 12:43 ` [PATCH v6 07/18] libxl IDL: rename json_fn to json_gen_fn Wei Liu
2014-06-09 12:43 ` [PATCH v6 08/18] libxl_json: introduce libxl__object_from_json Wei Liu
2014-06-09 12:43 ` [PATCH v6 09/18] libxl_json: introduce parser functions for builtin types Wei Liu
2014-06-09 12:43 ` [PATCH v6 10/18] libxl/gentypes.py: special-case KeyedUnion map handle generation Wei Liu
2014-06-09 12:43 ` [PATCH v6 11/18] libxl/gentypes.py: don't generate default values Wei Liu
2014-06-10 13:25   ` Ian Campbell
2014-06-10 13:43     ` Wei Liu
2014-06-10 14:31       ` Wei Liu
2014-06-10 14:56       ` Ian Campbell
2014-06-10 15:49         ` Wei Liu
2014-06-10 15:54           ` Ian Campbell
2014-06-10 15:59             ` Wei Liu
2014-06-09 12:43 ` [PATCH v6 12/18] libxl IDL: generate code to parse libxl__json_object to libxl_FOO struct Wei Liu
2014-06-10 13:32   ` Ian Campbell
2014-06-09 12:43 ` [PATCH v6 13/18] libxl/gentest.py: test JSON parser Wei Liu
2014-06-09 12:43 ` [PATCH v6 14/18] libxl: introduce libxl_key_value_list_length Wei Liu
2014-06-09 12:43 ` [PATCH v6 15/18] libxl: introduce libxl_cpuid_policy_list_length Wei Liu
2014-06-09 12:43 ` [PATCH v6 16/18] libxl: copy function for builtin types Wei Liu
2014-06-09 12:43 ` [PATCH v6 17/18] libxl IDL: generate deep copy functions Wei Liu
2014-06-09 12:43 ` [PATCH v6 18/18] libxl/gentest.py: test " Wei Liu
2014-06-10 14:14 ` [PATCH v6 00/18] libxl: JSON infrastructure, fixes and prerequisite patches for new API Ian Campbell
2014-06-10 20:10   ` Boris Ostrovsky
2014-06-10 20:51     ` Boris Ostrovsky
2014-06-10 21:21       ` Wei Liu
2014-06-10 21:38         ` Boris Ostrovsky
2014-06-10 21:42           ` Wei Liu
2014-06-11  8:47         ` Ian Campbell
2014-06-11  8:53           ` Wei Liu

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=1402415941.16827.64.camel@Solace \
    --to=dario.faggioli@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.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.