qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 10/11] dataplane: add virtio-blk data plane c


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v5 10/11] dataplane: add virtio-blk data plane code
Date: Thu, 6 Dec 2012 15:03:56 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Dec 06, 2012 at 08:35:55AM +0100, Paolo Bonzini wrote:
> Il 05/12/2012 21:47, Stefan Hajnoczi ha scritto:
> > +
> > +/* Block until pending requests have completed
> > + *
> > + * The vring continues to be serviced so ensure no new requests will be 
> > added
> > + * to avoid races.
> > + */
> > +void virtio_blk_data_plane_drain(VirtIOBlockDataPlane *s)
> > +{
> > +    qemu_mutex_lock(&s->num_reqs_lock);
> > +    while (s->num_reqs > 0) {
> > +        qemu_cond_wait(&s->no_reqs_cond, &s->num_reqs_lock);
> > +    }
> > +    qemu_mutex_unlock(&s->num_reqs_lock);
> > +}
> 
> Hi Stefan,
> 
> so this was not changed from v4?

It's unchanged.  From the v5 cover letter:

 * Note I did not get rid of the mutex+condvar approach to draining
   requests.  I've had good feedback on the performance of the patch
   series so I'm not worried about eliminating the lock (it's very
   rarely contended).  Hope Michael and Paolo are okay with this
   approach.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]