[Top][All Lists]
[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: |
Jan Kiszka |
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:27:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2012-09-19 11:23, Avi Kivity wrote:
> On 09/19/2012 12:19 PM, liu ping fan wrote:
>> On Wed, Sep 19, 2012 at 5:14 PM, Paolo Bonzini <address@hidden> wrote:
>>> 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.
>>>
>> But if we takes coarse firstly, then the mmio-dispatcher will still
>> contend for the big lock against each other.
>
> Can you detail the sequence?
>
>>
>>> 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.
>>>
>> I think fine->coarse may be the rule, since for some code path, it is
>> not necessary to take coarse lock.
>
> coarse->fine doesn't mean you have to take the coarse lock.
>
> Valid:
> lock(coarse)
> lock(fine)
This is invalid due to prio inversion issues, independent of potential
deadlocks.
Jan
>
> Valid:
> lock(find)
>
> Valid:
> lock(coarse)
>
> Invalid:
> lock(fine)
> lock(coarse)
>
>
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
- [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, liu ping fan, 2012/09/18
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Avi Kivity, 2012/09/19
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, liu ping fan, 2012/09/19
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Avi Kivity, 2012/09/19
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, liu ping fan, 2012/09/19
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Paolo Bonzini, 2012/09/19
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, liu ping fan, 2012/09/19
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Avi Kivity, 2012/09/19
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock,
Jan Kiszka <=
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Jan Kiszka, 2012/09/19
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, liu ping fan, 2012/09/20
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Paolo Bonzini, 2012/09/20
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, liu ping fan, 2012/09/20
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Paolo Bonzini, 2012/09/20
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Avi Kivity, 2012/09/20
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, liu ping fan, 2012/09/21
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Paolo Bonzini, 2012/09/21
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Avi Kivity, 2012/09/19
- Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock, Paolo Bonzini, 2012/09/19