From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R61oA-0005nL-4k for qemu-devel@nongnu.org; Tue, 20 Sep 2011 11:00:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R61o6-00087E-4V for qemu-devel@nongnu.org; Tue, 20 Sep 2011 11:00:26 -0400 Received: from thoth.sbs.de ([192.35.17.2]:20213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R61o5-000873-QZ for qemu-devel@nongnu.org; Tue, 20 Sep 2011 11:00:22 -0400 Message-ID: <4E78AA84.7050702@siemens.com> Date: Tue, 20 Sep 2011 17:00:20 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4E78A2ED.50401@siemens.com> <4E78A7B5.6090607@redhat.com> In-Reply-To: <4E78A7B5.6090607@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] qxl: pthread_yield on QXL_IO_NOTIFY_OOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel On 2011-09-20 16:48, Gerd Hoffmann wrote: > On 09/20/11 16:27, Jan Kiszka wrote: >> Hi Gerd, >> >> can you (or anyone familiar with those bits) comment on pthread_yield() >> in ioport_write() of hw/qxl.c? Which threads are supposed to run this >> way? > > spice server thread. > >> Can't this relation be expressed explicitly? > > The thread is created by libspice-server, so we don't have a handle for it. And also no communication channel to kick? > >> If not, can we use a >> sleep here (how long?)? > > Good question. I'm tempted to just rip it out and run qxl_spice_oom() > unconditionally. The yield thing is best effort only anyway, there is > no guarantee that the spice server thread actually gets scheduled and > puts some stuff into the release ring. And the issue with sleeping is that we stall the vcpu. So just reporting oom is likely better. Thanks, Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux