From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it Date: Thu, 26 Jul 2012 16:00:52 +0300 Message-ID: <50113F84.6010802@redhat.com> References: <1343187070-27371-1-git-send-email-qemulist@gmail.com> <1343187070-27371-2-git-send-email-qemulist@gmail.com> <500FB77E.9010703@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini , qemu-devel@nongnu.org, kvm@vger.kernel.org, Stefan Hajnoczi , Marcelo Tosatti , Anthony Liguori , Jan Kiszka To: liu ping fan Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46806 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751960Ab2GZNBF (ORCPT ); Thu, 26 Jul 2012 09:01:05 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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