All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vl: Delay initialization of memory backends
@ 2016-08-31 20:17 Eduardo Habkost
  2016-08-31 21:47 ` no-reply
  0 siblings, 1 reply; 15+ messages in thread
From: Eduardo Habkost @ 2016-08-31 20:17 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini
  Cc: mprivozn, Bandan Das, qemu-stable, Daniel P. Berrange

Initialization of memory backends may take a while when
prealloc=yes is used, depending on their size. Initializing
memory backends before chardevs may delay the creation of monitor
sockets, and trigger timeouts on management software that waits
until the monitor socket is created by QEMU.  See, for example,
the bug report at:
https://bugzilla.redhat.com/show_bug.cgi?id=1371211

This patch fixes the problem by adding "memory-backend-*" classes
to the delayed-initialization list.

I believe a more appropriate fix would be creating objects and
chardevs in the same ordering specified on the command-line, but
this patch should fix the bug until we figure out a better way.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 vl.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/vl.c b/vl.c
index b3c80d5..7764032 100644
--- a/vl.c
+++ b/vl.c
@@ -2810,6 +2810,15 @@ static bool object_create_initial(const char *type)
         return false;
     }
 
+    /* Initialization of memory backends may delay chardev
+     * initialization for too long, and trigger timeouts on
+     * software that waits for a monitor socket to be created
+     * (e.g. libvirt).
+     */
+    if (g_str_has_prefix(type, "memory-backend-")) {
+        return false;
+    }
+
     return true;
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-09-05 11:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-31 20:17 [Qemu-devel] [PATCH] vl: Delay initialization of memory backends Eduardo Habkost
2016-08-31 21:47 ` no-reply
2016-09-01 15:10   ` Eduardo Habkost
2016-09-01 15:41     ` Paolo Bonzini
2016-09-01 17:39       ` Eduardo Habkost
2016-09-01 19:34         ` Eduardo Habkost
2016-09-01 22:29           ` Bandan Das
2016-09-02  8:59           ` Paolo Bonzini
2016-09-02 14:04             ` Eduardo Habkost
2016-09-02 14:56               ` Paolo Bonzini
2016-09-02 18:10                 ` Eduardo Habkost
2016-09-05 11:53                   ` Paolo Bonzini
2016-09-01 16:52     ` Michal Privoznik
2016-09-01 17:26       ` Eduardo Habkost
2016-09-02  6:13     ` Markus Armbruster

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.