qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [big lock] Discussion about the convention of device's


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock
Date: Wed, 19 Sep 2012 11:14:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

Il 19/09/2012 11:11, liu ping fan ha scritto:
>> > Why not? devA will drop its local lock, devX will retake the big lock
>> > recursively, devB will take its local lock.  In the end, we have biglock
>> > -> devB.
>> >
> But when adopting local lock, we assume take local lock, then biglock.

No, because the local lock will be dropped before taking the biglock.
The order must always be coarse->fine.

I don't know if the front-end (device) lock should come before or after
the back-end (e.g. netdev) lock in the hierarchy, but that's another story.

Paolo

> Otherwise another thread will take biglock then local lock, which
> cause the possibility of deadlock.
> 




reply via email to

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