From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1eAX-0003E6-QO for qemu-devel@nongnu.org; Thu, 08 Sep 2011 08:57:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1eAQ-0000U9-JA for qemu-devel@nongnu.org; Thu, 08 Sep 2011 08:57:25 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]:38020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1eAQ-0000TI-Go for qemu-devel@nongnu.org; Thu, 08 Sep 2011 08:57:18 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e3.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p88CWOxS003474 for ; Thu, 8 Sep 2011 08:32:24 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p88CvDt3256936 for ; Thu, 8 Sep 2011 08:57:13 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p888uxq0006265 for ; Thu, 8 Sep 2011 05:57:00 -0300 Message-ID: <4E68BBA8.9090604@us.ibm.com> Date: Thu, 08 Sep 2011 07:57:12 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1315398653-29945-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <4E67BB97.8070306@us.ibm.com> <4E6893F1.8070004@redhat.com> In-Reply-To: <4E6893F1.8070004@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH -V2] iohandler: update qemu_fd_set_handler to work with null call back arg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Kevin Wolf , "Aneesh Kumar K.V" , Stefan Hajnoczi , qemu-devel@nongnu.org On 09/08/2011 05:07 AM, Avi Kivity wrote: > On 09/07/2011 09:44 PM, Anthony Liguori wrote: >> >> I think this is a bit more complicated than is really needed. Here's >> what I came up with which also fixes another bug where the io channel >> could be freed twice. I stumbled across this via a very strange >> failure scenario. Avi, it might be worth trying this patch to see if >> it fixes your problem too. > > Right now, I've got more than just one problem. > >> >> One thing that I found challenging debugging this, coroutines make >> valgrind very unhappy. Is it possible that we could have a command >> line switch to fall back to the thread based coroutines so to make >> things more valgrind friendly? > > How is valgrind even aware of coroutines? Unless is doesn't implement > makecontext correctly, it shouldn't even be aware of them. It detects stack switching and has trouble differentiating between a legitimate stack switch and something more nefarious. I believe the heuristic it currently uses is the distance that RSP moves. If it moves more than a certain threshold, it assumes that's a stack switch. Regards, Anthony Liguori > >