libvirt/docs
Osier Yang f108944ae0 doc: Sort out the relationship between <vcpu>, <vcpupin>, and <emulatorpin>
These 3 elements conflicts with each other in either the doc
or the underlying codes.

Current problems:

Problem 1:

The doc shouldn't simply say "These settings are superseded
by CPU tuning. " for element <vcpu>. As except the tuning, <vcpu>
allows to specify the current, maxmum vcpu number. Apart from that,
<vcpu> also allows to specify the placement as "auto", which binds
the domain process to the advisory nodeset from numad.

Problem 2:

Doc for <vcpu> says its "cpuset" specify the physical CPUs
that the vcpus can be pinned. But it's not the truth, as
actually it only pin domain process to the specified physical
CPUs. So either it's a document bug, or code bug.

Problem 3:

Doc for <vcpupin> says it supersed "cpuset" of <vcpu>, it's
not quite correct, as each <vcpupin> specify the pinning policy
only for one vcpu. How about the ones which doesn't have
<vcpupin> specified? it says the vcpu will be pinned to all
available physical CPUs, but what's the meaning of attribute
"cpuset" of <vcpu> then?

Problem 4:

Doc for <emulatorpin> says it pin the emulator threads (domain
process in other context, perhaps another follow up patch to
cleanup the inconsistency is needed) to the physical CPUs
specified its attribute "cpuset". Which conflicts with
<vcpu>'s "cpuset". And actually in the underlying codes,
it set the affinity for domain process twice if both
"cpuset" for <vcpu> and <emulatorpin> are specified,
and <emulatorpin>'s pinning will override <vcpu>'s.

Problem 5:

When "placement" of <vcpu> is "auto" (I.e. uses numad to
get the advisory nodeset to which the domain process is
pinned to), it will also be overridden by <emulatorpin>,

This patch is trying to sort out the conflicts or bugs by:

1) Don't say <vcpu> is superseded by <cputune>

2) Keep the semanteme for "cpuset" of <vcpu> (I.e. Still says it
   specify the physical CPUs the virtual CPUs). But modifying it
   to mention it also set the pinning policy for domain process,
   and the CPU placement of domain process specified by "cpuset"
   of <vcpu> will be ingored if <emulatorpin> specified, and
   similary, the CPU placement of vcpu thread will be ignored
   if it has <vcpupin> specified, for vcpu which doesn't have
   <vcpupin> specified, it inherits "cpuset" of <vcpu>.

3) Don't say <vcpu> is supersed by <vcpupin>. If neither <vcpupin>
   nor "cpuset" of <vcpu> is specified, the vcpu will be pinned
   to all available pCPUs.

4) If neither <emulatorpin> nor "cpuset" of <vcpu> is specified,
   the domain process (emulator threads in the context) will be
   pinned to all available pCPUs.

5) If "placement" of <vcpu> is "auto", <emulatorpin> is not allowed.

6) hotplugged vcpus will also inherit "cpuset" of <vcpu>

Codes changes according to above document changes:

1) Inherit def->cpumask for each vcpu which doesn't have <vcpupin>
   specified, during parsing.

2) ping the vcpu which doesn't have <vcpupin> specified to def->cpumask
   either by cgroup for sched_setaffinity(2), which is actually done
   by 1).

3) Error out if "placement" == "auto", and <emulatorpin> is specified.
   Otherwise, <emulatorpin> is honored, and "cpuset" of <cpuset> is
   ignored.

4) Setup cgroup for each hotplugged vcpu, and setup the pinning policy
   by either cgroup or sched_setaffinity(2).

5) Remove cgroup and <vcpupin> for each hot unplugged vcpu.

Patches are following (6 in total except this patch)
2012-10-15 12:13:34 +08:00
..
api_extension xen_xs: name xendConfigVersion magic numbers 2012-02-01 16:28:17 -07:00
devhelp maint: consolidate several .gitignore files 2012-02-03 15:27:16 -07:00
html maint: consolidate several .gitignore files 2012-02-03 15:27:16 -07:00
internals Various typos and misspellings 2012-10-12 00:03:43 +02:00
schemas conf: Mark missing optional USB devices in domain XML 2012-10-12 10:55:32 +02:00
32favicon.png
404.html.in docs: fix 404 page when fetched from different location 2012-08-10 10:54:23 +02:00
api_extension.html.in docs/virsh: various minor fixes 2012-08-10 10:58:54 +02:00
api.html.in Various typos and misspellings 2012-10-12 00:03:43 +02:00
apibuild.py Various typos and misspellings 2012-10-12 00:03:43 +02:00
apps.html.in Various typos and misspellings 2012-10-12 00:03:43 +02:00
archdomain.html.in
architecture.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
architecture.gif
architecture.html.in
archnetwork.html.in
archnode.html.in
archstorage.html.in
auth.html.in Use XDG Base Directories instead of storing in home directory 2012-05-14 15:15:58 +01:00
bindings.html.in
bugs.html.in Fix some typos in messages, docs and comments. 2012-08-22 15:34:07 -06:00
compiling.html.in Add a ./run script for running programs from the local directory. 2012-09-18 10:59:16 +01:00
contact.html.in
csharp.html.in
deployment.html.in
devguide.html.in
docs.html.in
downloads.html.in
drivers.html.in docs: rudimentary phyp documentation 2012-10-03 13:02:57 -06:00
drvesx.html.in esx: Support folders in the path of vpx:// connection URIs 2011-11-01 18:45:42 +01:00
drvhyperv.html.in hyperv: Add basic documentation 2011-08-26 17:52:55 +02:00
drvlxc.html.in virterror.c: Fix several spelling mistakes 2012-02-03 11:32:51 -07:00
drvopenvz.html.in docs: fix path to openvz network configuration file 2012-04-16 17:02:08 +02:00
drvparallels.html.in parallels: add domain configuration example 2012-08-15 16:39:40 +08:00
drvphyp.html.in docs: Drop useless </p> in drvphyp.html.in 2012-10-09 15:20:32 +02:00
drvqemu.html.in Fix some typos in messages, docs and comments. 2012-08-22 15:34:07 -06:00
drvremote.html.in
drvtest.html.in Fix some typos in messages, docs and comments. 2012-08-22 15:34:07 -06:00
drvuml.html.in
drvvbox.html.in vbox: Support shared folders 2011-10-29 19:50:48 +02:00
drvvmware.html.in
drvxen.html.in Fix some typos in messages, docs and comments. 2012-08-22 15:34:07 -06:00
errors.html.in
et.png
firewall.html.in Various typos and misspellings 2012-10-12 00:03:43 +02:00
footer_corner.png
footer_pattern.png
format.html.in
formatcaps.html.in Remove powerMgmt_valid field from capabilities struct 2011-11-30 10:12:30 +00:00
formatdomain.html.in doc: Sort out the relationship between <vcpu>, <vcpupin>, and <emulatorpin> 2012-10-15 12:13:34 +08:00
formatnetwork.html.in network: support <forward mode='hostdev'> in network driver 2012-08-17 15:43:26 -04:00
formatnode.html.in Fix some typos in messages, docs and comments. 2012-08-22 15:34:07 -06:00
formatnwfilter.html.in Fix some typos in messages, docs and comments. 2012-08-22 15:34:07 -06:00
formatsecret.html.in secret: add Ceph secret type 2011-10-28 11:34:17 -06:00
formatsnapshot.html.in snapshot: also support disks by path 2011-09-05 07:03:04 -06:00
formatstorage.html.in Added timestamps to storage volumes 2012-08-02 17:14:17 -06:00
formatstorageencryption.html.in
generic.css
goals.html.in
hacking1.xsl
hacking2.xsl docs: point out git send-email location, be more stern about make check 2012-09-08 23:20:29 -04:00
hacking.html.in Various typos and misspellings 2012-10-12 00:03:43 +02:00
hooks.html.in Add some missing hook functions 2012-06-13 18:23:00 +01:00
hvsupport.pl Remove tabs from all perl files & enforce this 2012-07-30 13:09:57 +01:00
index.html.in hyperv: Add basic documentation 2011-08-26 17:52:55 +02:00
index.py
internals.html.in docs: correct invalid xml 2011-04-01 16:03:11 -06:00
intro.html.in
java.html.in doc: Add Maven repository to Java bindings documentation 2012-10-04 09:17:45 -06:00
library.xen
libvirt-daemon-arch.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-daemon-arch.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-driver-arch.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-driver-arch.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-header-bg.png
libvirt-header-logo.png
libvirt-net-logical.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-net-logical.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-net-physical.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-net-physical.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-object-model.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-object-model.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt.css Add documentation about migration. 2011-10-28 10:07:45 +01:00
libvirtLogo404.png Add a custom 404 error page for the website 2012-06-18 20:10:29 +01:00
libvirtLogo.png
locking.html.in locking: Implement lock failure action in sanlock driver 2012-10-11 14:41:42 +02:00
logging.html.in docs: Enhance documentation of log_filters 2012-08-17 21:26:53 +02:00
madeWith.png
main.css
Makefile.am build: don't fail when xsltproc is missing 2012-09-05 12:05:55 -06:00
migration-managed-direct.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-managed-direct.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-managed-p2p.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-managed-p2p.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-native.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-native.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-tunnel.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-tunnel.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-unmanaged-direct.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-unmanaged-direct.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration.html.in docs: fix links in migration.html TOC 2012-10-04 16:58:25 -06:00
newapi.xsl Improve tokenizing of linkable terms 2011-08-12 07:35:19 -06:00
news.html.in Release of libvirt-0.10.2 2012-09-24 12:46:37 +08:00
news.xsl
node.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
node.gif
page.xsl docs: page.xsl: fix FAQ link in subdirectories 2012-09-11 17:36:03 +02:00
pending.html.in docs/virsh: various minor fixes 2012-08-10 10:58:54 +02:00
php.html.in
python.html.in docs: fix typo in python bindings 2012-02-09 14:28:40 -07:00
relatedlinks.html.in doc: include article about libvirt+audit in relatedlinks.html 2012-09-20 15:47:21 -06:00
remote.html.in Various typos and misspellings 2012-10-12 00:03:43 +02:00
search.php.code.in docs: autogenerate search.php 2012-08-10 10:58:38 +02:00
search.php.in docs: autogenerate search.php 2012-08-10 10:58:38 +02:00
site.xsl docs: fix 404 page when fetched from different location 2012-08-10 10:54:23 +02:00
sitemap.html.in docs: Add 'maintenance releases' link in 'News' sidebar 2012-05-07 10:50:53 -04:00
storage.html.in Add a sheepdog backend for the storage driver 2012-07-18 20:08:27 +01:00
structures.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
subsite.xsl
testapi.html.in
testsuites.html.in
testtck.html.in
todo.cfg-example
todo.pl Remove tabs from all perl files & enforce this 2012-07-30 13:09:57 +01:00
uri.html.in Use XDG Base Directories instead of storing in home directory 2012-05-14 15:15:58 +01:00
virshcmdref.html.in
windows.html.in
wrapstring.xsl