qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chris Takemura <ctakemura@axcient.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Use of watch_pipe in xs_handle structure
Date: Wed, 12 Feb 2014 20:00:52 -0800	[thread overview]
Message-ID: <CF218374.378%ctakemura@axcient.com> (raw)

[-- 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 --]

                 reply	other threads:[~2014-02-13  4:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CF218374.378%ctakemura@axcient.com \
    --to=ctakemura@axcient.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).