From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43178 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPJTB-0004fk-51 for qemu-devel@nongnu.org; Thu, 17 Jun 2010 14:05:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPJT6-0001AW-Pr for qemu-devel@nongnu.org; Thu, 17 Jun 2010 14:05:40 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:58251) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPJT6-00019s-MT for qemu-devel@nongnu.org; Thu, 17 Jun 2010 14:05:36 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e2.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o5HHqliL013274 for ; Thu, 17 Jun 2010 13:52:47 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5HI5UFN1355986 for ; Thu, 17 Jun 2010 14:05:30 -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 o5HI5TPK029462 for ; Thu, 17 Jun 2010 15:05:29 -0300 Message-ID: <4C1A63E8.1000802@linux.vnet.ibm.com> Date: Thu, 17 Jun 2010 13:05:28 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH V4 2/3] qemu: Generic task offloading framework: threadlets References: <20100616115404.10988.62371.stgit@localhost.localdomain> <20100616115656.10988.96529.stgit@localhost.localdomain> <4C18C4C8.8090901@redhat.com> <20100617085325.GA2849@in.ibm.com> <4C19F477.6080709@redhat.com> In-Reply-To: <4C19F477.6080709@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Qemu-development List , "Aneesh Kumar K.V" , Avi Kivity , Corentin Chary , ego@in.ibm.com On 06/17/2010 05:09 AM, Paolo Bonzini wrote: >>>> + while (QTAILQ_EMPTY(&(queue->request_list))&& >>>> + (ret != ETIMEDOUT)) { >>>> + ret = qemu_cond_timedwait(&(queue->cond), >>>> + &(queue->lock), 10*100000); >>>> + } >>> >>> Using qemu_cond_timedwait is a hack for not properly broadcasting the >>> condvar in flush_threadlet_queue. >> >> I think Anthony answered this one. > > I think he said that the code has been changed so I am right? :) You're right about the condition we check in the exit path but the timedwait is needed to expire an idle thread. Regards, Anthony Liguori