From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRR0E-00017c-2i for qemu-devel@nongnu.org; Thu, 25 Oct 2012 13:13:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRR0C-0000kf-39 for qemu-devel@nongnu.org; Thu, 25 Oct 2012 13:13:54 -0400 Received: from mail-ia0-f173.google.com ([209.85.210.173]:47403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRR0B-0000kb-Ui for qemu-devel@nongnu.org; Thu, 25 Oct 2012 13:13:52 -0400 Received: by mail-ia0-f173.google.com with SMTP id m10so1557052iam.4 for ; Thu, 25 Oct 2012 10:13:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <508971E2.9050309@redhat.com> References: <1350897839-29593-1-git-send-email-pingfank@linux.vnet.ibm.com> <508971E2.9050309@redhat.com> Date: Thu, 25 Oct 2012 18:13:51 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [patch v4 00/16] push mmio dispatch out of big lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Liu Ping Fan , Stefan Hajnoczi , Marcelo Tosatti , qemu-devel@nongnu.org, Anthony Liguori , Jan Kiszka , Paolo Bonzini On 25 October 2012 18:07, Avi Kivity wrote: > On 10/25/2012 04:04 PM, Peter Maydell wrote: >> Is there a clear up to date description somewhere of the design and >> locking strategy here somewhere? I'd rather not have to try to >> reconstitute it by reading the whole patchset... > > It was described somewhere in a document by Marcelo and myself. > Basically the goal is to arrive at > > address_space_write(): > rcu_read_lock() > mr = lookup() > mr->ref() > rcu_read_unlock() > > mr->dispatch() > > mr->unref() > > This is the same strategy used in many places in the kernel. Yes, but this is rather short on the details (eg, does every device have its own lock, what are we doing with irqs, how about dma from devices, etc etc). It's the details of the design I'd like to see described... -- PMM