From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: n schembr <nschembr@yahoo.com>
Subject: Re: QEMU Automated Testing (was [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c ...)
Date: Fri, 27 Jul 2007 23:03:15 +0100 [thread overview]
Message-ID: <200707272303.17504.paul@codesourcery.com> (raw)
In-Reply-To: <46AA317C.7010908@codemonkey.ws>
> >> how close is thread safey?
> >
> > In a useful form: a fair way off.
> >
> > It's relatively simple to hack something together than runs. Making it
> > work correctly and go fast is much harder though. My current prototype
> > (running on 2 cores) runs about a quarter the speed of normal qemu, and
> > dies shortly after booting because the guest atomic synchronisation
> > primitives don't work right.
>
> This later problem seems like the hardest to solve to me. Did you have
> any ideas here that don't involve hand coding the translation for atomic
> instructions?
Yes. I do exclusive access locking at the TLB level. i.e. creating a TLB entry
for a writable page forces that page to be flushed from all the other CPU
TLBs.
There's some wiggle room in the definition of a "writable" page. If other
critera are met it should be sufficient to just do this exclusion for atomic
accesses.
If necessary the same technique can be used to avoid write ordering and
coherency problems without having to accurately map guest barriers onto the
equivalent host operations. This is handy when most of the guest barriers are
implicit, e.g. when emulating a strictly ordered guest on a weakly ordered
host.
In theory this could be taken to extremes and used to split emulation of a
single machine over multiple address spaces/nodes. In practice the
contention on a normal SMP operating system is high enough that this is not
practical.
Paul
next prev parent reply other threads:[~2007-07-27 22:03 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 17:15 QEMU Automated Testing (was [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c ...) n schembr
2007-07-27 17:38 ` Paul Brook
2007-07-27 17:55 ` Anthony Liguori
2007-07-27 22:03 ` Paul Brook [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-07-27 22:59 n schembr
2007-04-07 18:14 [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c Paul Brook
2007-04-07 20:45 ` Paul Brook
2007-04-07 22:18 ` J. Mayer
2007-04-07 23:13 ` Paul Brook
2007-04-07 23:54 ` J. Mayer
2007-04-08 0:04 ` Thiemo Seufer
2007-04-08 7:49 ` IRQ handling (was [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c ...) J. Mayer
2007-04-08 14:41 ` Thiemo Seufer
2007-04-08 16:31 ` J. Mayer
2007-04-08 20:43 ` QEMU Automated Testing " Natalia Portillo
2007-04-08 22:07 ` Eduardo Felipe
2007-04-08 23:53 ` Natalia Portillo
2007-04-09 9:36 ` Eduardo Felipe
2007-04-09 21:19 ` Rob Landley
2007-04-10 11:24 ` Jamie Lokier
2007-04-10 12:00 ` Pierre d'Herbemont
2007-07-27 14:21 ` Dan Shearer
2007-07-27 14:29 ` Anthony Liguori
2007-07-27 14:34 ` Dan Shearer
2007-07-27 14:58 ` Sunil Amitkumar Janki
2007-07-27 15:12 ` Dan Shearer
2007-07-27 15:50 ` Sunil Amitkumar Janki
2007-07-27 16:04 ` Dan Shearer
2007-07-27 16:50 ` Jan Marten Simons
2007-07-27 18:51 ` Thiemo Seufer
2007-07-27 19:55 ` Sunil Amitkumar Janki
2007-07-28 10:17 ` Thiemo Seufer
2007-07-28 11:41 ` Sunil Amitkumar Janki
2007-07-27 18:54 ` Andreas Färber
2007-07-28 10:36 ` Thiemo Seufer
2007-07-29 15:31 ` Andreas Färber
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=200707272303.17504.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=nschembr@yahoo.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).