From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49206 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPBDW-0001il-10 for qemu-devel@nongnu.org; Thu, 17 Jun 2010 05:16:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPBDU-00055S-JP for qemu-devel@nongnu.org; Thu, 17 Jun 2010 05:16:57 -0400 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:43951) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPBDT-00054z-TN for qemu-devel@nongnu.org; Thu, 17 Jun 2010 05:16:56 -0400 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by e28smtp09.in.ibm.com (8.14.4/8.13.1) with ESMTP id o5H8DilP006043 for ; Thu, 17 Jun 2010 13:43:44 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5H9Gmev630954 for ; Thu, 17 Jun 2010 14:46:48 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o5H9GmJw015298 for ; Thu, 17 Jun 2010 14:46:48 +0530 Date: Thu, 17 Jun 2010 14:46:47 +0530 From: Gautham R Shenoy Subject: Re: [Qemu-devel] Re: [PATCH V4 2/3] qemu: Generic task offloading framework: threadlets Message-ID: <20100617091647.GC2849@in.ibm.com> References: <20100616115656.10988.96529.stgit@localhost.localdomain> <4C18C4C8.8090901@redhat.com> <20100616142236.GA20052@shareable.org> <4C18DFD7.1090102@redhat.com> <4C18E1E8.3030606@linux.vnet.ibm.com> <4C18E52B.9010600@redhat.com> <4C18EBC4.4040603@linux.vnet.ibm.com> <4C18F348.9000909@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Reply-To: ego@in.ibm.com List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corentin Chary Cc: Qemu-development List , Anthony Liguori , Avi Kivity , Paolo Bonzini , "Aneesh Kumar K.V" On Wed, Jun 16, 2010 at 06:06:35PM +0200, Corentin Chary wrote: > On Wed, Jun 16, 2010 at 5:52 PM, Anthony Liguori > wrote: > > On 06/16/2010 10:47 AM, Corentin Chary wrote: > >> > >> I would need something like flush_threadlet_queue for the vnc server. > >> I need it in > >> vnc_disconnect(), vnc_dpy_resize() and vnc_dpy_cpy() so wait (and/or > >> abort) current > >> encoding jobs. > >> > > > > I'm not sure threadlets are the right thing for the VNC server. =A0Th= e VNC > > server wants one dedicated thread. =A0Threadlets are a thread pool. =A0= You could > > potentially use one thread per client but I doubt it would be worth i= t. > > > > At any rate, flushing the full queue is overkill. =A0You want to wait= for your > > specific thread to terminate and you want to block execution until th= at > > happens. =A0IOW, you want to join the thread. > > >=20 > Oh right, I should have read the changelog more carefully, it's a > global queue now ... Well, the APIs that allow the subsystems to create their own private queues is still retained. But having read what Anthony mentioned, I doubt if you would want to do that for a single helper thread :-) >=20 > Thanks, > --=20 > Corentin Chary > http://xf.iksaif.net --=20 Thanks and Regards gautham