qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 4/4] dma-helpers: Move reschedule_dma BH to b


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 4/4] dma-helpers: Move reschedule_dma BH to blk's AioContext
Date: Fri, 13 Mar 2015 11:48:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 13/03/2015 09:58, Fam Zheng wrote:
>> > 
>> > This looks good.  However, I wonder if dma_aio_cancel should also call
>> > cpu_unregister_map_client.  In this case, it's much better to just use a
>> > lock for the list (though you can still use atomics for the in-use flag).
> The other possibility is grab a reference for the cpu_register_map_client 
> call,
> and release it in reschedule_dma. This way the atomics can keep, but we'll 
> need
> a "finished" flag in DMAAIOCB to avoid double completion.

Considering this is a slow path, a lock seems preferrable.

It's not that your patch were bad, it's that a pre-existing bug got in
your way, and broke the assumptions you made.

Paolo



reply via email to

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