[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] qxl: pthread_yield on QXL_IO_NOTIFY_OOM
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] qxl: pthread_yield on QXL_IO_NOTIFY_OOM |
Date: |
Tue, 20 Sep 2011 17:00:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
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