From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuNgn-0000Jd-I3 for qemu-devel@nongnu.org; Thu, 26 Jul 2012 09:01:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuNgd-0000ju-85 for qemu-devel@nongnu.org; Thu, 26 Jul 2012 09:01:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuNgd-0000jq-07 for qemu-devel@nongnu.org; Thu, 26 Jul 2012 09:01:03 -0400 Message-ID: <50113F84.6010802@redhat.com> Date: Thu, 26 Jul 2012 16:00:52 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1343187070-27371-1-git-send-email-qemulist@gmail.com> <1343187070-27371-2-git-send-email-qemulist@gmail.com> <500FB77E.9010703@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: kvm@vger.kernel.org, Stefan Hajnoczi , Marcelo Tosatti , qemu-devel@nongnu.org, Anthony Liguori , Jan Kiszka , Paolo Bonzini On 07/26/2012 03:56 PM, liu ping fan wrote: > On Wed, Jul 25, 2012 at 5:08 PM, Paolo Bonzini wrote: >> Il 25/07/2012 05:31, Liu Ping Fan ha scritto: >>> From: Liu Ping Fan >>> >>> rwlock: >>> qemu_device_tree_mutex >>> >>> rd side: >>> --device_del(destruction of device will be postphoned until unplug >>> ack from guest), >>> --pci hot-unplug >>> --iteration (qdev_reset_all) >>> >>> wr side: >>> --device_add >>> >> >> This is not defined anywhere, is a piece missing in the patch? >> > Oh, yes, I miss the patch. In that patch, these rwlock are just place holder. > I see there is already try to implement rwlock for qemu. > http://lists.gnu.org/archive/html/qemu-devel/2011-10/msg00192.html > and is it the time for introduce rwlock for qemu? >>From the description above, I don't see why it can't be a mutex. -- error compiling committee.c: too many arguments to function