From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFmqe-0006u8-BT for qemu-devel@nongnu.org; Thu, 05 Apr 2012 09:35:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFmqO-0007S9-VA for qemu-devel@nongnu.org; Thu, 05 Apr 2012 09:35:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFmqO-0007P6-Lj for qemu-devel@nongnu.org; Thu, 05 Apr 2012 09:35:20 -0400 Message-ID: <4F7D9358.4040700@redhat.com> Date: Thu, 05 Apr 2012 14:43:04 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1333442297-18932-1-git-send-email-laijs@cn.fujitsu.com> <1333442297-18932-8-git-send-email-laijs@cn.fujitsu.com> In-Reply-To: <1333442297-18932-8-git-send-email-laijs@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/10] coroutine: process the coroutines woken by child when child yield List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lai Jiangshan Cc: Anthony Liguori , Stefan Hajnoczi , qemu-devel@nongnu.org Am 03.04.2012 10:38, schrieb Lai Jiangshan: > If the child wake up someone, process them. > > It would the child complete its works if woken coroutine release the locks > that the child needs. > > It may help for the cache, if the child wake up some someone, they are > probably accessing the same data. > > Signed-off-by: Lai Jiangshan Are you very sure that this is correct, particularly with respect to reentrancy of nested coroutines? This is why this has become a bottom half in the first place (instead of directly reentering the unlocked coroutine in qemu_co_mutex_unlock), and it's not completely clear to me if the problem doesn't exist when you do it after a coroutine has exited instead of in an BH. I'd be very careful with such changes. Kevin