[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] PATCH: 8/25: Concurrent dispatch of RPC methods
- From: "Richard W.M. Jones" <rjones redhat com>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] PATCH: 8/25: Concurrent dispatch of RPC methods
- Date: Thu, 15 Jan 2009 17:55:40 +0000
On Thu, Jan 15, 2009 at 05:22:52PM +0000, Daniel P. Berrange wrote:
> On Thu, Jan 15, 2009 at 05:07:01PM +0000, Richard W.M. Jones wrote:
> > On Tue, Jan 13, 2009 at 05:41:48PM +0000, Daniel P. Berrange wrote:
> > > + /* Get a unique serial number for this message. */
> > > + rv->serial = priv->counter++;
> >
> > This (and similar) are safe because we hold the remoteDriverLock until
> > we enter the actual call?
>
> That is correct - the first thing all the public API entry points do
> is grab the lock.
>
> The lock is only then released, when the main thread is waiting on I/O
> in the poll() call:
>
> + remoteDriverUnlock(priv);
> +
> + repoll:
> + ret = poll(fds, ARRAY_CARDINALITY(fds), -1);
> + if (ret < 0 && errno == EINTR)
> + goto repoll;
> + remoteDriverLock(priv);
>
>
> Or when additional threads are sleeping on the condition variable.
+1 then.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]