On Thu, Sep 20, 2012 at 3:54 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > Il 20/09/2012 09:51, liu ping fan ha scritto: >> Sorry, donot catching your meaning. Does not "coarse->fine" mean >> LOCK(coarse)-->LOCK(fine); .. UNLOCK(fine)-->UNLOCK(coarse) ? > > Yes. > >>> > Valid: >>> > lock(coarse) >>> > lock(fine) >>> > >> But it is conflict with " localLock(fine) --> bigLock(coarse)" which >> is taken when mmio dispatch. > > No, MMIO dispatch has to discard the fine-grained lock before acquiring > the big lock. > This will cause the device state broken, and expose device under changing risk.
> If you allow > > lock(fine) > lock(coarse) > > then the (presumably higher-priority) thread that is requesting the > fine-grained lock must wait for the lower-priority thread that holds the > coarse-grained lock. Then you get priority inversion. > Which thread has higher-priority? Why does the thread with coarse lock have lower-priority? Thanks and regards, pingfan > Paolo