qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/5] Add target memory mapping API


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 1/5] Add target memory mapping API
Date: Tue, 20 Jan 2009 12:17:10 +0200
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Anthony Liguori wrote:

Scenario 2 (callbacks)

0) Register minimum required bounce memory at init time
1) Register callback and begin data mapping
2) Succeed in mapping first part of packet and 1 page of bounced buffer
3) Bounce buffer is exhausted, callback will not be invoked until the next unmap
4) Deadlock

You could add some sort of call to determine if the bounce memory is exhausted and try to take some corrective action in #2 but it gets ugly.

So as I said earlier, I think the callback model makes sense when you have streaming data (where there are no packet boundaries). I think it's pretty difficult to avoid deadlocking though with callbacks in a packet model (where boundaries must be preserved).


If you specify the boundaries (an additional input array, or maybe a function that says whether a particular point is a "good enough" boundary) then I think it can be workable.

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





reply via email to

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