From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrMq1-0002Ao-AL for qemu-devel@nongnu.org; Tue, 25 Jun 2013 02:34:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrMkW-0006L8-Pg for qemu-devel@nongnu.org; Tue, 25 Jun 2013 02:29:10 -0400 Received: from mail-ee0-x231.google.com ([2a00:1450:4013:c00::231]:57503) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrMg6-0004tS-EU for qemu-devel@nongnu.org; Tue, 25 Jun 2013 02:24:34 -0400 Received: by mail-ee0-f49.google.com with SMTP id b57so6402463eek.36 for ; Mon, 24 Jun 2013 23:24:33 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51C9379C.80605@redhat.com> Date: Tue, 25 Jun 2013 08:24:28 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1372181916-4676-1-git-send-email-pingfank@linux.vnet.ibm.com> In-Reply-To: <1372181916-4676-1-git-send-email-pingfank@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/3] make bh safe with hot-unplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Il 25/06/2013 19:38, Liu Ping Fan ha scritto: > This series relies on refcnt of object used by bh callback to run against unplug. > > Open issue: > Another choice may be rcu, but I think some issues are hard to resolve. > Using rcu, we have two choice: > when holding object refcnt, call qemu_bh_delete(); then after grace period, we can release. > Or making qemu_bh_delete() sync in the path of DeviceState's finalization. What do you mean exactly? qemu_bh_delete() is async, but it operates on dynamically-allocated memory. Paolo > but currently, the callers of qemu_bh_delete() can not satisfy any of the two condition.