Re: [Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-09 Thread Stefan Hajnoczi
On Thu, May 08, 2014 at 07:58:11PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@gmail.com) wrote: > > On Thu, May 8, 2014 at 3:44 PM, Dr. David Alan Gilbert > > wrote: > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > > > > > > > > >> How to synchronize with an IO

Re: [Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-08 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > On Thu, May 8, 2014 at 3:44 PM, Dr. David Alan Gilbert > wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > > > > >> How to synchronize with an IOThread > >> --- > >> AioContext is not thread-safe so so

Re: [Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-08 Thread Stefan Hajnoczi
On Thu, May 8, 2014 at 3:44 PM, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > >> How to synchronize with an IOThread >> --- >> AioContext is not thread-safe so some rules must be followed when using file >> descriptors, event

Re: [Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-08 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > How to synchronize with an IOThread > --- > AioContext is not thread-safe so some rules must be followed when using file > descriptors, event notifiers, timers, or BHs across threads: > > 1. AioContext functions ca

Re: [Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-08 Thread Stefan Hajnoczi
On Thu, May 08, 2014 at 03:10:48PM +0200, Paolo Bonzini wrote: > Il 08/05/2014 15:08, Kevin Wolf ha scritto: > >Am 08.05.2014 um 12:16 hat Stefan Hajnoczi geschrieben: > >>Side note: The main loop and IOThread are both event loops but their code is > >>not shared completely. Sometimes it is useful

Re: [Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-08 Thread Paolo Bonzini
Il 08/05/2014 15:08, Kevin Wolf ha scritto: Am 08.05.2014 um 12:16 hat Stefan Hajnoczi geschrieben: Side note: The main loop and IOThread are both event loops but their code is not shared completely. Sometimes it is useful to remember that although they are conceptually similar they are current

Re: [Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-08 Thread Kevin Wolf
Am 08.05.2014 um 12:16 hat Stefan Hajnoczi geschrieben: > Side note: The main loop and IOThread are both event loops but their code is > not shared completely. Sometimes it is useful to remember that although they > are conceptually similar they are currently not interchangeable. We need to be ca

Re: [Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-08 Thread Paolo Bonzini
Il 08/05/2014 13:56, Stefan Hajnoczi ha scritto: > Is dataplane the only user for this now? Yes, and neither dataplane (x-data-plane=on) nor IOThread (-object iothread,id=) are finalized. There was a discussion about -object and QOM on the mailing list a while back. We reached the conclusion t

Re: [Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-08 Thread Stefan Hajnoczi
On Thu, May 8, 2014 at 1:33 PM, Fam Zheng wrote: > On Thu, 05/08 12:16, Stefan Hajnoczi wrote: >> Here is background on the latest dataplane work in my "[PATCH v2 00/25] >> dataplane: use QEMU block layer" series. It's necessary for anyone who wants >> to build on top of it. Please leave feedbac

Re: [Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-08 Thread Fam Zheng
Great document, thanks for writing this! I have a few questions below. On Thu, 05/08 12:16, Stefan Hajnoczi wrote: > Here is background on the latest dataplane work in my "[PATCH v2 00/25] > dataplane: use QEMU block layer" series. It's necessary for anyone who wants > to build on top of it. Ple

[Qemu-devel] [RFC] dataplane: IOThreads and writing dataplane-capable code

2014-05-08 Thread Stefan Hajnoczi
Here is background on the latest dataplane work in my "[PATCH v2 00/25] dataplane: use QEMU block layer" series. It's necessary for anyone who wants to build on top of it. Please leave feedback or questions and I'll submit a docs/ patch with the final version of this document. This document exp