qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH -V3 09/32] virtio-9p: Implement P9_TWRITE/ Threa


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH -V3 09/32] virtio-9p: Implement P9_TWRITE/ Thread model in QEMU
Date: Thu, 01 Apr 2010 17:34:37 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Thunderbird/3.0.3

On 04/01/2010 04:14 PM, Paul Brook wrote:

On a philosophical note, threads may be easier to model complex
hardware that includes a processor, for example our scsi card (and how
about using tcg as a jit to boost it :)
Yeah, it's hard to argue that script evaluation shouldn't be done in a
thread.  But that doesn't prevent me from being very cautious about how
and where we use threading :-)
I agree that making script execution asynchronous is a good thing, however I'm
not convinced that (3) is the best way to do this. It's certainly the most
flexible model, however it also places responsibility for locking/correctness
on the device developer.

A more limited scheme (e.g. asynchronous callbacks) can actually be
significant advantage. By forcing the developer to solve the problem in a
particular way we significantly reduce the scope for race conditions, and
hopefully restrict all locking concerns to common code/APIs.

Can you elaborate? When would the callbacks be called? When would the callbacks yield back?

If the script isn't run to completion (a halt instruction), there isn't really a good answer to these questions.

[1] This issue may come from accidental misuse of terminology, but it's an
important distinction.

Missing reference to footnote.

--
error compiling committee.c: too many arguments to function





reply via email to

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