qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
  • * Re: [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread
           [not found] <1340290158-11036-1-git-send-email-qemulist@gmail.com>
           [not found] ` <1340290158-11036-3-git-send-email-qemulist@gmail.com>
    @ 2012-06-21 15:23 ` Jan Kiszka
      2012-06-22 10:24   ` liu ping fan
           [not found] ` <1340290158-11036-2-git-send-email-qemulist@gmail.com>
      2 siblings, 1 reply; 15+ messages in thread
    From: Jan Kiszka @ 2012-06-21 15:23 UTC (permalink / raw)
      To: Liu Ping Fan; +Cc: qemu-devel, Anthony Liguori
    
    On 2012-06-21 16:49, Liu Ping Fan wrote:
    > Nowadays, we use qemu_mutex_lock_iothread()/qemu_mutex_unlock_iothread() to
    > protect the race to access the emulated dev launched by vcpu threads & iothread.
    > 
    > But this lock is too big. We can break it down.
    > These patches separate the CPUArchState's protection from the other devices, so we
    > can have a per-cpu lock for each CPUArchState, not the big lock any longer.
    
    Anything that reduces lock dependencies is generally welcome. But can
    you specify in more details what you gain, and under which conditions?
    
    I'm skeptical if this is the right area to start. With the in-kernel
    irqchip enabled, no CPUArchState field is touched during normal
    operations (unless I missed something subtle in the past). At the same
    time, this locking is unfortunately fairly complex and invasive, so not
    "cheap" to integrate.
    
    IMO more interesting is breaking out some I/O path, e.g. from a NIC to a
    network backend, and get this processed in a separate thread without
    touching the BQL (Big QEMU Lock). I've experimental patches for this
    here, but they need rebasing and polishing.
    
    Thanks,
    Jan
    
    -- 
    Siemens AG, Corporate Technology, CT T DE IT 1
    Corporate Competence Center Embedded Linux
    
    ^ permalink raw reply	[flat|nested] 15+ messages in thread
  • [parent not found: <1340290158-11036-2-git-send-email-qemulist@gmail.com>]
  • * [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread
    @ 2012-06-21 15:06 Liu Ping Fan
      0 siblings, 0 replies; 15+ messages in thread
    From: Liu Ping Fan @ 2012-06-21 15:06 UTC (permalink / raw)
      To: qemu-devel
    
    Nowadays, we use qemu_mutex_lock_iothread()/qemu_mutex_unlock_iothread() to
    protect the race to access the emulated dev launched by vcpu threads & iothread.
    
    But this lock is too big. We can break it down.
    These patches separate the CPUArchState's protection from the other devices, so we
    can have a per-cpu lock for each CPUArchState, not the big lock any longer.
    
    ^ permalink raw reply	[flat|nested] 15+ messages in thread

    end of thread, other threads:[~2012-06-24 14:10 UTC | newest]
    
    Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <1340290158-11036-1-git-send-email-qemulist@gmail.com>
         [not found] ` <1340290158-11036-3-git-send-email-qemulist@gmail.com>
    2012-06-21 15:02   ` [Qemu-devel] [PATCH 2/2] kvm: use per-cpu lock to free vcpu thread out of the big lock Jan Kiszka
    2012-06-22 20:06   ` Anthony Liguori
    2012-06-23  9:32     ` liu ping fan
    2012-06-24 14:09       ` liu ping fan
    2012-06-21 15:23 ` [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread Jan Kiszka
    2012-06-22 10:24   ` liu ping fan
    2012-06-22 10:37     ` Jan Kiszka
    2012-06-22 20:11       ` Anthony Liguori
    2012-06-22 21:14         ` Jan Kiszka
    2012-06-22 21:44           ` Anthony Liguori
    2012-06-22 22:27             ` Jan Kiszka
    2012-06-22 22:56               ` Anthony Liguori
    2012-06-23  9:10                 ` Jan Kiszka
         [not found] ` <1340290158-11036-2-git-send-email-qemulist@gmail.com>
    2012-06-22 20:01   ` [Qemu-devel] [PATCH 1/2] CPUArchState: introduce per-cpu lock Anthony Liguori
    2012-06-21 15:06 [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread Liu Ping Fan
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).