[Libvir] PATCH: Fix stats overflow
by Daniel P. Berrange
FYI, I have just applied the attached patch to fix a 32-bit overflow in
the stats code. We were doing a left shift of more than 32 bits on '1L'
which is only 32-bit wide on 32-bit platforms. I simply cast to a long long
instead.
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
16 years, 11 months
[Libvir] diagnose invalid domain ID numbers (and invalid integers, in general)
by Jim Meyering
Hello,
There are over 30 uses of strtol in libvirt, and they all can silently
accept invalid input. The invalid string might range from an outlandish
domain ID like 4294967298 to strings of digits followed by bogus alpha.
Maybe not worth worrying about, you say? But what if they indicate user
confusion, e.g., 1,000 vs 1000? Silently interpreting "1,000" as "1"
would leave the poor user even more confused :-) IMHO, they should all
be diagnosed.
Fixing them properly requires some infrastructure,
so that you don't end up duplicating too much logic.
This patch adds part of that infrastructure and fixes only a single
instance, to start with. I'll fix the others once we're all agreed
on the form of the infrastructure. I've fixed the bug that would make
this command:
echo domname $(echo 2^32+2|bc)|src/virsh ...
act just like this one:
echo domname 2|src/virsh ...
Now, it does this:
$ echo domname 4294967298|src/virsh --quiet --connect test://$PWD/docs/testnode.xml
virsh > error: failed to get domain '4294967298'
virsh >
The new test script, tests/int-overflow demonstrates
precisely that before/after behavior.
This change adds some other new files.
src/xstrtol.c and .h contain the first of a few new
strtol-like functions. This first one, xstrtol_i,
converts to an "int". Other wrappers will convert to wider types.
The goal is to put the tedious tests into the wrappers so that
applications can be robust without all the duplicated gore.
It is important (from type-safety and maintainability standpoints) to
ensure that the resulting integral value be "returned" via an argument
pointer, not a return value. With the former, you're guaranteed to have
matching types. Simply getting the value via "return", it is too easy
to mistakenly change width or signedness.
Here's the new function's description and signature:
/* Like strtol, but produce an "int" result, and check more carefully.
Return 0 upon success; return -1 to indicate failure.
When END_PTR is NULL, the byte after the final valid digit must be NUL.
Otherwise, it's like strtol and lets the caller check any suffix for
validity. This function is careful to return -1 when the string S
represents a number that is not representable as an "int". */
int xstrtol_i(char const *s, char **end_ptr, int base, int *result)
My first attempt put the definition of xstrtol_i in
the logical place: util.c. But that would have required linking
virsh with util.c, and that fails due to an unsatisfied reference
to __virRaiseError. So instead, it's in its own file, now.
If you want it in some other file, just tell me where.
BTW, I have no strong preference for the name xstrtol_i. Bear in mind
that the name tells you that it's based on (and limited to) strtol's
"long" type, and produces an 'i'nt value. It happens to be the same one
used in at least one other project, and closely resembles the xstrto*
functions in gnulib. Note that there are almost certainly places in the
code where we'll want to use a variant that targets an unsigned type like
"size_t" or a wider type like long long. In addition to other uses of
strtol that I plan to fix, there are three uses of strtoll, too.
Patch attached below.
If you apply it with plain-old-patch, remember to run this:
chmod a+x tests/int-overflow
Thu Nov 8 09:59:43 CET 2007 Jim Meyering <meyering(a)redhat.com>
Diagnose an invalid domain ID number.
* src/virsh.c: Include "xstrtol.h"
(vshCommandOptDomainBy): Detect integer overflow in domain ID number.
* tests/int-overflow: New script. Test for the above-fixed bug.
* tests/Makefile.am (TESTS): Add int-overflow.
(TESTS_ENVIRONMENT): Define, to propagate $abs_top_* variables
into the int-overflow script.
(valgrind): Adapt rule not to clobber new TESTS_ENVIRONMENT.
* src/xstrtol.h, src/xstrtol.c: New files.
* src/Makefile.am (virsh_SOURCES): Add xstrtol.c and xstrtol.h.
---
src/Makefile.am | 2 +-
src/virsh.c | 10 ++++------
src/xstrtol.c | 33 +++++++++++++++++++++++++++++++++
src/xstrtol.h | 7 +++++++
tests/Makefile.am | 10 ++++++++--
tests/int-overflow | 22 ++++++++++++++++++++++
6 files changed, 75 insertions(+), 9 deletions(-)
create mode 100644 src/xstrtol.c
create mode 100644 src/xstrtol.h
create mode 100755 tests/int-overflow
16 years, 11 months
[Libvir] [PATCH 0/2] KVM network stats
by Richard W.M. Jones
This two part patch collects network interface stats from KVM domains.
With this patch, virt-top will show the stats in its network interface
view, as in the screengrab below.
Rich.
virt-top 15:47:38 - x86_64 4/4CPU 2814MHz 3967MB 0.1%
1 domains, 1 active, 1 running, 0 sleeping, 0 paused, 0 inactive D:0 O:0 X:0
CPU: 3.0% Mem: 250 MB (250 MB by guests)
ID S RXBY TXBY RXPK TXPK DOMAIN INTERFACE
1 R 222K 5436 175 78 debian32kvm vnet0
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
16 years, 11 months
[Libvir] [PATCH] Miscellaneous cleanups for virNodeGetFreeMemory and virNodeGetCellsFreeMemory
by Richard W.M. Jones
(1) Add documentation to the hvsupport page for virNodeGetFreeMemory
(2) Fix documentation on the hvsupport page to show that the two new
functions aren't supported in the QEMU, KVM or remote cases yet.
(3) Add DEBUG() calls to both new functions.
(4) xen_internal.c functions may now support a connection argument to
virXenError / virXenErrorFunc. I have modified this file so that where
the connection is known, it is passed. Because of the way virterror
works, errors should always be attached to a connection if at all
possible, otherwise there is no sane way to turn non-connection errors
into exceptions in language bindings, and also error handling in
threaded code won't work.
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
16 years, 11 months
[Libvir] [PATCH] Make "make distcheck" work.
by Jim Meyering
Here's another infrastructure-fixing patch.
I got most of the way to an honest "make distcheck",
but fixing a final failing sub-test wasn't worth the effort,
so I punted and added the top level "distuninstallcheck"
target to make it skip that part.
Make "make distcheck" work.
* Makefile.am: Expand some "*" wildcards, and (for now) disable
the relatively unimportant, distuninstallcheck target.
Fix a few redirect-directly-to-target bugs.
Add a few $(srcdir)/ prefixes and add an uninstall-local rule.
* docs/Makefile.am: More of the same. Split some long lines.
* docs/examples/Makefile.am: Likewise.
* python/Makefile.am: Likewise.
* python/tests/Makefile.am: Likewise.
* qemud/Makefile.am: Likewise.
* tests/Makefile.am: Remove the directories already listed in SUBDIRS.
---
Makefile.am | 3 +
docs/Makefile.am | 95 +++++++++++++++++++++++++++++++++++++++-----
docs/examples/Makefile.am | 13 ++++--
python/Makefile.am | 6 ++-
python/tests/Makefile.am | 2 +
qemud/Makefile.am | 26 ++++++++----
tests/Makefile.am | 8 +---
7 files changed, 120 insertions(+), 33 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index e1e6884..eaa204e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,3 +41,6 @@ cov-am:
> $(top_builddir)/coverage/index.html
for i in $(top_builddir)/src/*.gcov ; do o=`echo $$i | sed -e 's,$(top_builddir)/src,coverage,'` ; \
perl $(srcdir)/scripts/coverage-report-entry.pl $$i > $$o.html ; done
+
+# disable this check
+distuninstallcheck:
diff --git a/docs/Makefile.am b/docs/Makefile.am
index c7dfe24..2aa923d 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -7,18 +7,82 @@ DOC_SOURCE_DIR=../src
PAGES= index.html bugs.html FAQ.html remote.html
APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
APIsymbols.html APIchunk0.html
-EXTRA_DIST= \
- libvirt-api.xml libvirt-refs.xml apibuild.py \
- *.xsl *.html *.gif html/*.html html/*.png \
- *.xml *.rng
-
man_MANS=
+html = \
+ book1.html \
+ index.html \
+ libvirt-conf.html \
+ libvirt-lib.html \
+ libvirt-libvirt.html \
+ libvirt-virterror.html
+
+png = \
+ left.png \
+ up.png \
+ home.png \
+ right.png
+
+gif = \
+ Libxml2-Logo-90x34.gif \
+ architecture.gif \
+ node.gif \
+ redhat.gif
+
+dot_html = \
+ APIchunk0.html \
+ APIchunk1.html \
+ APIchunk2.html \
+ APIchunk3.html \
+ APIchunk4.html \
+ APIchunk5.html \
+ APIchunk6.html \
+ APIchunk7.html \
+ APIconstructors.html \
+ APIfiles.html \
+ APIfunctions.html \
+ APIsymbols.html \
+ FAQ.html \
+ architecture.html \
+ bugs.html \
+ downloads.html \
+ errors.html \
+ format.html \
+ hvsupport.html \
+ index.html \
+ intro.html \
+ libvir.html \
+ news.html \
+ python.html \
+ remote.html \
+ uri.html
+
+xml = \
+ libvirt-api.xml \
+ libvirt-refs.xml \
+ testdomfc4.xml \
+ testdomfv0.xml \
+ testnetdef.xml \
+ testnetpriv.xml \
+ testnode.xml
+
+rng = \
+ libvirt.rng \
+ network.rng
+
+EXTRA_DIST= \
+ libvirt-api.xml libvirt-refs.xml apibuild.py \
+ site.xsl newapi.xsl api.xsl \
+ $(dot_html) $(gif) html \
+ $(xml) $(rng)
+
all: web $(top_builddir)/NEWS $(man_MANS)
virsh.1: virsh.pod
- pod2man -c "Virtualization Support" virsh.pod > virsh.1 && cp virsh.1 $(top_builddir)
+ pod2man -c "Virtualization Support" $(srcdir)/virsh.pod > $@-t
+ mv $@-t $@
+ cp $@ $(top_builddir)
api: libvirt-api.xml libvirt-refs.xml $(APIPAGES) $(srcdir)/html/index.html
@@ -50,7 +114,9 @@ $(srcdir)/html/index.html: libvirt-api.xml $(srcdir)/newapi.xsl
echo "Validating the resulting XHTML pages" ; \
$(XMLLINT) --nonet --valid --noout html/*.html ; fi );
-libvirt-api.xml libvirt-refs.xml: apibuild.py ../include/libvirt/*.h ../src/*.h ../src/*.c
+libvirt-api.xml libvirt-refs.xml: apibuild.py \
+ $(srcdir)/../include/libvirt/*.h \
+ $(srcdir)/../src/*.h $(srcdir)/../src/*.c
-(./apibuild.py)
$(top_builddir)/NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html
@@ -67,8 +133,15 @@ rebuild: api all
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
- -@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html $(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
+ -@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html \
+ $(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif \
+ $(DESTDIR)$(HTML_DIR)
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
- -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
- -@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
-
+ for h in $(html); do \
+ $(INSTALL) -m 0644 $(srcdir)/html/$$h $(DESTDIR)$(HTML_DIR)/html; done
+ for p in $(png); do \
+ $(INSTALL) -m 0644 $(srcdir)/html/$$p $(DESTDIR)$(HTML_DIR)/html; done
+
+uninstall-local:
+ for h in $(html); do rm $(DESTDIR)$(HTML_DIR)/html/$$h; done
+ for p in $(png); do rm $(DESTDIR)$(HTML_DIR)/html/$$p; done
diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am
index c62d128..8a66999 100644
--- a/docs/examples/Makefile.am
+++ b/docs/examples/Makefile.am
@@ -6,15 +6,20 @@ LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la
rebuild: examples.xml index.html
-examples.xml: index.py *.c
+examples.xml: index.py info1.c suspend.c
-(a)($(srcdir)/index.py)
index.html: examples.xml examples.xsl $(top_srcdir)/docs/site.xsl
- -@(if [ -x $(XSLTPROC) ] ; then $(XSLTPROC) examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html ; fi)
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ $(XSLTPROC) examples.xsl examples.xml \
+ && echo "Rebuilt web page" \
+ && xmllint --valid --noout index.html; \
+ fi)
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
- -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
+ -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml \
+ $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
EXTRA_DIST=examples.xsl index.py examples.xml
@@ -37,5 +42,3 @@ tests: $(noinst_PROGRAMS)
@(echo '## examples regression tests')
@($(CHECKER) ./suspend)
@($(CHECKER) ./info1)
-
-
diff --git a/python/Makefile.am b/python/Makefile.am
index 4f97610..1fe60ff 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -49,7 +49,8 @@ $(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
libvirt.py: $(srcdir)/libvir.py libvirtclass.py
- cat $(srcdir)/libvir.py libvirtclass.py > libvirt.py
+ cat $(srcdir)/libvir.py libvirtclass.py > $@-t
+ mv $@-t $@
$(libvirtmod_la_OBJECTS): $(GENERATED)
@@ -60,6 +61,9 @@ install-data-local:
@(for doc in $(DOCS) ; \
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
+uninstall-local:
+ rm -f $(DESTDIR)$(pythondir)/libvirt.py
+
CLEANFILES= $(GENERATED) libvirt.py
else
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
index dfa52e4..6011fef 100644
--- a/python/tests/Makefile.am
+++ b/python/tests/Makefile.am
@@ -32,3 +32,5 @@ install-data-local:
-(for test in $(PYTESTS); \
do @INSTALL@ -m 0644 $(srcdir)/$$test $(DESTDIR)$(EXAMPLE_DIR) ; done)
+uninstall-local:
+ for test in $(PYTESTS); do rm -f $(DESTDIR)$(EXAMPLE_DIR)/$$test; done
diff --git a/qemud/Makefile.am b/qemud/Makefile.am
index 3da6265..6aedf8c 100644
--- a/qemud/Makefile.am
+++ b/qemud/Makefile.am
@@ -47,19 +47,23 @@ libvirtd_CFLAGS += $(AVAHI_CFLAGS)
libvirtd_LDADD += $(AVAHI_LIBS)
endif
+default_xml_dest = libvirt/qemu/networks/default.xml
install-data-local: install-init
mkdir -p $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart
- $(INSTALL_DATA) $(srcdir)/default-network.xml $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
- sed -i -e "s,</name>,</name>\n <uuid>$(UUID)</uuid>," $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
+ $(INSTALL_DATA) $(srcdir)/default-network.xml \
+ $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
+ sed -i -e "s,</name>,</name>\n <uuid>$(UUID)</uuid>," \
+ $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
test -e $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml || \
- ln -s ../default.xml $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
+ ln -s ../default.xml \
+ $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/qemu
mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
mkdir -p $(DESTDIR)$(localstatedir)/lib/libvirt
uninstall-local: uninstall-init
rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
- rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
+ rm -f $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
rmdir $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart || :
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
@@ -95,20 +99,24 @@ remote_dispatch_proc_switch.h: remote_generate_stubs.pl remote_protocol.x
if LIBVIRT_INIT_SCRIPTS_RED_HAT
install-init: libvirtd.init
mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
- $(INSTALL_SCRIPT) libvirtd.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
+ $(INSTALL_SCRIPT) libvirtd.init \
+ $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
- $(INSTALL_SCRIPT) $(srcdir)/libvirtd.sysconf $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
+ $(INSTALL_SCRIPT) $(srcdir)/libvirtd.sysconf \
+ $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
uninstall-init:
- rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
+ rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd \
+ $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
libvirtd.init: libvirtd.init.in
sed \
-e s!\@localstatedir\@!@localstatedir@!g \
-e s!\@sbindir\@!@sbindir@!g \
-e s!\@sysconfdir\@!@sysconfdir@!g \
- < $< > $@
- chmod a+x libvirtd.init
+ < $< > $@-t
+ chmod a+x $@-t
+ mv $@-t $@
CLEANFILES = libvirtd.init
else
diff --git a/tests/Makefile.am b/tests/Makefile.am
index fec2f20..998877a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -34,14 +34,8 @@ LDADDS = \
EXTRA_DIST = \
xmlrpcserver.py \
test_conf.sh \
- confdata \
qemuxml2argvdata \
- xml2sexprdata \
- nodeinfodata \
- virshdata \
- xencapsdata \
- sexpr2xmldata \
- xmconfigdata
+ nodeinfodata
noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \
reconnect xmconfigtest xencapstest qemuxml2argvtest qemuxml2xmltest \
--
1.5.3.5.666.gfb5f
16 years, 11 months
[Libvir] [PATCH] stats_linux.c: Only include xs.h if WITH_XEN.
by Jim Paris
Fixes compile error when building --without-xen on a host that has no
Xen headers installed.
---
src/stats_linux.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/stats_linux.c b/src/stats_linux.c
index 5e6d06c..125af45 100644
--- a/src/stats_linux.c
+++ b/src/stats_linux.c
@@ -19,7 +19,9 @@
#include <string.h>
#include <unistd.h>
+#ifdef WITH_XEN
#include <xs.h>
+#endif
#include "internal.h"
#include "xen_unified.h"
--
1.5.3.4
16 years, 11 months
[Libvir] The problem of the definition of tuning informations
by Daniel Veillard
I promised that mail for the beginning of the week but I still have
a very hard time to try to formulate a good plan of action, I'm still
stuck in a dilemna, see below.
What is it?
-----------
I think tuning informations are that set of parameters associated
to a domain or a host, which are not stricly needed to get the
domain(s) working but improve their runtime behaviour.
To me this includes:
- scheduling parameters the scope may be host/hypervisor/domain
- vcpu affinity i.e. to which set of physical CPU each of the
vcpu may be bound
- and possibly others ...
The problem:
------------
People would like to associate those to the XML domain informations,
the goal being to be able to restore those informations when a domain
(re-)starts.
I have been objecting it so far because, I think those informations
don't have the same lifetime and scope as the other domain informations
saved in the XML. Since they are not needed to start the domain, and
that once the domain is started the existing domain API can be used
to change those informations, it is better to keep them separate.
However I got objections from David Lutterkort [1], Jim Fehlig [2],
and John Levon [3] plus of course the initial request for it from
Tatsuro Enokura (and the Fujistu people in general) [4]
The problem to me comes from 2 things:
1/ storing tuning informations in domains descriptions is not sufficient
2/ if we store them there we also need to always save them when exporting
the XML domain file
2/ is fairly important to avoid a lot of problems as we have experienced
before for example with console informations. If the input for virsh create
gets different from the output of dumpxml, a lot of rather annoying things
happen in practice, it certainly generate confusion. So we really need
to output those tuning data if we put them in.
Also I strongly believe in 1/, i.e. tuning informations are cross domain
and they are vey likely to change fast as soon as the management applications
will get deployed, but even in relatively small deployment the tuning is
rather a per host informations, which may depend on the current workload
of the machine. I don't believe in tuning being loaded at create time
and never changing later. Even in my own very basic usage that doesn't match
my use which lead me to load and stop domain on demand for short period
of time.
My opinion:
-----------
We need better tools, even for simple use case to be able to save
an existing tuning for a domain or a full machine, and reload it
when needed. This is IMHO better done on top of the existing API
which already have the entry points to implement them. My idea is
to provide tuning commands in virsh [5]. If you implement tuning both
at creation time and in the tool, this mean you either make them
different in which case you have no coherency between what you say
when you create a domain or save its config and what you do at the
virsh level. If you don't make it different (for example trying to
use the same kind of XML syntax), then you need code for doing this
both in the tool and in the library itself, or you export as a
new API the tuning load and save. Exporting as a parallel API what
we have already for scheduling and VCPU affinity makes the API
more complex, and less coherent.
I don't want to force the decision one way or another, it is
probable I missed something, but I don't think adding tuning informations
to the domain configuration file to be really that convenient,
I could be done better, and with less associated problems by
keeping those separate.
Daniel
[1] https://www.redhat.com/archives/libvir-list/2007-October/msg00250.html
[2] https://www.redhat.com/archives/libvir-list/2007-November/msg00003.html
[3] https://www.redhat.com/archives/libvir-list/2007-October/msg00046.html
[4] https://www.redhat.com/archives/libvir-list/2007-October/msg00221.html
[5] https://www.redhat.com/archives/libvir-list/2007-October/msg00245.html
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
16 years, 11 months
[Libvir] latest NUMA/cpuset code testing
by beth kon
I tested the latest CVS libvirt on a 128-way x3950 and create, define,
and start appear to work well with various cpusets specified. The only
thing I noticed was that dumpxml does not grab the cpuset info. I have
not looked at the code to verify, but is this expected? Maybe you
discussed this Daniel, but I can't remember at the moment.
--
Elizabeth Kon (Beth)
IBM Linux Technology Center
Open Hypervisor Team
email: eak(a)us.ibm.com
16 years, 11 months