<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/docs/aio_notify_bug.promela, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/docs/aio_notify_bug.promela?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/docs/aio_notify_bug.promela?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2017-06-07T16:22:03+00:00</updated>
<entry>
<title>docs: create config/, devel/ and spin/ subdirectories</title>
<updated>2017-06-07T16:22:03+00:00</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2017-06-06T14:46:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ac06724a715864942e2b5e28f92d5d5421f0a0b0'/>
<id>urn:sha1:ac06724a715864942e2b5e28f92d5d5421f0a0b0</id>
<content type='text'>
Developer documentation should be its own manual.  As a start, move all
developer-oriented files to a separate directory.

Also move non-text files to their own directories: docs/config/ for
QEMU -readconfig input, and docs/spin/ for formal models to be used
with the SPIN model checker.

Reviewed-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>AioContext: fix broken placement of event_notifier_test_and_clear</title>
<updated>2015-07-22T11:41:40+00:00</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2015-07-21T14:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=21a03d17f2edb1e63f7137d97ba355cc6f19d79f'/>
<id>urn:sha1:21a03d17f2edb1e63f7137d97ba355cc6f19d79f</id>
<content type='text'>
event_notifier_test_and_clear must be called before processing events.
Otherwise, an aio_poll could "eat" the notification before the main
I/O thread invokes ppoll().  The main I/O thread then never wakes up.
This is an example of what could happen:

   i/o thread       vcpu thread                     worker thread
   ---------------------------------------------------------------------
   lock_iothread
   notify_me = 1
   ...
   unlock_iothread
                                                     bh-&gt;scheduled = 1
                                                     event_notifier_set
                    lock_iothread
                    notify_me = 3
                    ppoll
                    notify_me = 1
                    aio_dispatch
                     aio_bh_poll
                      thread_pool_completion_bh
                                                     bh-&gt;scheduled = 1
                                                     event_notifier_set
                     node-&gt;io_read(node-&gt;opaque)
                      event_notifier_test_and_clear
   ppoll
   *** hang ***

"Tracing" with qemu_clock_get_ns shows pretty much the same behavior as
in the previous bug, so there are no new tricks here---just stare more
at the code until it is apparent.

One could also use a formal model, of course.  The included one shows
this with three processes: notifier corresponds to a QEMU thread pool
worker, temporary_waiter to a VCPU thread that invokes aio_poll(),
waiter to the main I/O thread.  I would be happy to say that the
formal model found the bug for me, but actually I wrote it after the
fact.

This patch is a bit of a big hammer.  The next one optimizes it,
with help (this time for real rather than a posteriori :)) from
another, similar formal model.

Reported-by: Richard W. M. Jones &lt;rjones@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Fam Zheng &lt;famz@redhat.com&gt;
Tested-by: Richard W.M. Jones &lt;rjones@redhat.com&gt;
Message-id: 1437487673-23740-6-git-send-email-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
</feed>
