qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Use of watch_pipe in xs_handle structure
@ 2014-02-13  4:00 Chris Takemura
  0 siblings, 0 replies; only message in thread
From: Chris Takemura @ 2014-02-13  4:00 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

Hi,

I'm trying to debug a problem that causes qemu-dm to lock up with Xen HVM domains.  We're using the qemu version that came with Xen 3.4.2.  I know it's old, but we're stuck with it for a little while yet.

I think the hang is related to thread synchronization and the xenstore, but I'm not sure how it all fits together. In particular, I don't understand the lines in xs.c that handle the watch_pipe, e.g.:

        /* Kick users out of their select() loop. */
        if (list_empty(&h->watch_list) &&
            (h->watch_pipe[1] != -1))
            while (write(h->watch_pipe[1], body, 1) != 1)
                continue;

It looks to me like the other thread blocks while reading from the pipe, and the write allows it to continue.  But this code seems like it does the same thing as the condvar_signal call that comes slightly after, and therefore it seems like I could safely #ifndef USE_PTHREAD it out.  Is this the case?

[-- Attachment #2: Type: text/html, Size: 1487 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-13  4:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13  4:00 [Qemu-devel] Use of watch_pipe in xs_handle structure Chris Takemura

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).