[libvirt] [PATCHv6 0/7] block io throttle via per-device block IO tuning
by Eric Blake
Here's the latest state of Lei's patch series with all my comments
folded in. I may have a few more tweaks to make now that I'm at
the point of testing things with both old qemu (graceful rejection)
and new qemu (sensical return values), so it may be a day or two (or
even a weekend, since this is a holiday weekend for me) before I
actually push this, so it wouldn't hurt if anyone else wants to
review in the meantime.
Lei Li (7):
Add new API virDomain{Set, Get}BlockIoTune
Add virDomain{Set, Get}BlockIoTune support to the remote driver
Support block I/O throttle in XML
Implement virDomain{Set, Get}BlockIoTune for the qemu driver
Enable the blkdeviotune command in virsh
Support virDomain{Set, Get}BlockIoTune in the python API
Add tests for blkdeviotune
daemon/remote.c | 64 ++++
docs/formatdomain.html.in | 39 +++
docs/schemas/domaincommon.rng | 122 +++++--
include/libvirt/libvirt.h.in | 63 ++++
python/generator.py | 2 +
python/libvirt-override-api.xml | 16 +
python/libvirt-override.c | 178 ++++++++++
src/conf/domain_conf.c | 90 +++++-
src/conf/domain_conf.h | 14 +
src/driver.h | 20 ++
src/libvirt.c | 148 +++++++++
src/libvirt_public.syms | 6 +
src/qemu/qemu_command.c | 31 ++
src/qemu/qemu_driver.c | 340 ++++++++++++++++++++
src/qemu/qemu_monitor.c | 33 ++
src/qemu/qemu_monitor.h | 8 +
src/qemu/qemu_monitor_json.c | 176 ++++++++++
src/qemu/qemu_monitor_json.h | 8 +
src/qemu/qemu_monitor_text.c | 151 +++++++++-
src/qemu/qemu_monitor_text.h | 8 +
src/remote/remote_driver.c | 57 ++++
src/remote/remote_protocol.x | 27 ++-
src/remote_protocol-structs | 24 ++
.../qemuxml2argv-blkdeviotune.args | 7 +
.../qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml | 30 ++
tests/qemuxml2argvtest.c | 2 +
tests/qemuxml2xmltest.c | 1 +
tools/virsh.c | 244 ++++++++++++++
tools/virsh.pod | 30 ++
29 files changed, 1900 insertions(+), 39 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml
--
1.7.7.3
12 years, 11 months
[libvirt] [PATCH] spec: mark directories in /var/run as ghosts
by Eric Blake
We have several directories that are created on the fly, and which
only contain state relevant to a running libvirtd process (all
located in /var/run). Since the directories are created as needed,
and make no sense without a running libvirtd, we want them deleted
if libvirt is uninstalled. And in F15 and newer, /var/run is on
tmpfs (forcing us to recreate on the fly); which means that someone
trying to verify a complete rpm will fail if the directory does not
currently exist because libvirtd has not been started since boot.
The solution, then, is to mark the directories as %ghost, so that
rpm knows that we own them and will clean it up if libvirt is
uninstalled, but will no longer create the directory for us at
install, nor complain at verify time if the directory does not exist.
See https://bugzilla.redhat.com/show_bug.cgi?id=656611.
* libvirt.spec.in (%files): Add %ghost to temporary directories
that we don't install, but want cleaned up on libvirt removal.
---
libvirt.spec.in | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index f61a243..06c949b 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1082,7 +1082,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%{_datadir}/libvirt/networks/default.xml
%endif
-%dir %{_localstatedir}/run/libvirt/
+%ghost %dir %{_localstatedir}/run/libvirt/
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/
@@ -1090,24 +1090,24 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
%if %{with_qemu}
-%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
+%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%endif
%if %{with_lxc}
-%dir %{_localstatedir}/run/libvirt/lxc/
+%ghost %dir %{_localstatedir}/run/libvirt/lxc/
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
%endif
%if %{with_uml}
-%dir %{_localstatedir}/run/libvirt/uml/
+%ghost %dir %{_localstatedir}/run/libvirt/uml/
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/
%endif
%if %{with_libxl}
-%dir %{_localstatedir}/run/libvirt/libxl/
+%ghost %dir %{_localstatedir}/run/libvirt/libxl/
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
%endif
%if %{with_network}
-%dir %{_localstatedir}/run/libvirt/network/
+%ghost %dir %{_localstatedir}/run/libvirt/network/
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
%endif
--
1.7.7.3
12 years, 11 months
[libvirt] [PATCH 0/6] plug memory leaks
by ajia@redhat.com
From: Alex Jia <ajia(a)redhat.com>
Detected by Coverity.
Alex Jia (6):
src/conf/domain_conf.c: Plug memory leak on virDomainDefParseXML() error path
src/qemu/qemu_process.c: Plug memory leak on qemuProcessWaitForMonitor() error path
src/rpc/virnetclient.c: Plug memory leak on virNetClientSendInternal() error path
src/uml/uml_driver.c: Plug memory leak on umlStartVMDaemon() error path
src/util/virnetdevbridge.c: Plug memory leak on virNetDevBridgeGet() sucessful path
src/util/virnetdevmacvlan.c: Plug memory leak on virNetDevMacVLanCreateWithVPortProfile() error path
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
src/conf/domain_conf.c | 1 +
src/qemu/qemu_process.c | 1 +
src/rpc/virnetclient.c | 1 +
src/uml/uml_driver.c | 1 +
src/util/virnetdevbridge.c | 1 +
src/util/virnetdevmacvlan.c | 1 +
6 files changed, 6 insertions(+), 0 deletions(-)
12 years, 11 months
[libvirt] 'make check' hangs
by Wen Congyang
When I run 'make check', it hangs sometimes.
I use gdb to attach lt-virsh, and the following is the
backtrace:
(gdb) thread 1
[Switching to thread 1 (Thread 0x7fc6c04d5800 (LWP 24099))]#0 0x0000003bdce0804d in pthread_join () from /lib64/libpthread.so.0
(gdb) bt
#0 0x0000003bdce0804d in pthread_join () from /lib64/libpthread.so.0
#1 0x000000000041c0b3 in vshDeinit (ctl=0x7fff015f4570) at virsh.c:17262
#2 0x00000000004248d1 in main (argc=<value optimized out>, argv=0x7fff015f4728) at virsh.c:17608
(gdb) thread 2
[Switching to thread 2 (Thread 0x7fc6c04d4700 (LWP 24138))]#0 0x0000003bdc2dc053 in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x0000003bdc2dc053 in poll () from /lib64/libc.so.6
#1 0x00007fc6c075359c in virEventPollRunOnce () at util/event_poll.c:619
#2 0x00007fc6c07527d7 in virEventRunDefaultImpl () at util/event.c:247
#3 0x000000000041bea3 in vshEventLoop (opaque=0x7fff015f4570) at virsh.c:16800
#4 0x00007fc6c0764702 in virThreadHelper (data=<value optimized out>) at util/threads-pthread.c:157
#5 0x0000003bdce077f1 in start_thread () from /lib64/libpthread.so.0
#6 0x0000003bdc2e570d in clone () from /lib64/libc.so.6
(gdb)
12 years, 11 months