From: Gerd Hoffmann <kraxel@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qxl: pthread_yield on QXL_IO_NOTIFY_OOM
Date: Tue, 20 Sep 2011 17:14:39 +0200 [thread overview]
Message-ID: <4E78ADDF.5010102@redhat.com> (raw)
In-Reply-To: <4E78AA84.7050702@siemens.com>
On 09/20/11 17:00, Jan Kiszka wrote:
> 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?
There is a pipe, and qxl_spice_oom() will kick that way.
I think the yield tries to avoid that kick in case the spice server
thread is already busy processing stuff. I'm not fully sure though, the
code predates /me working on spice. Each time I look at that piece of
code I'm asking myself whenever it actually has a positive effect and I
somehow doubt it. I never found the time for deeper investigation though.
>> 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.
Agree on that.
cheers,
Gerd
prev parent reply other threads:[~2011-09-20 15:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 14:27 [Qemu-devel] qxl: pthread_yield on QXL_IO_NOTIFY_OOM Jan Kiszka
2011-09-20 14:48 ` Gerd Hoffmann
2011-09-20 15:00 ` Jan Kiszka
2011-09-20 15:14 ` Gerd Hoffmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E78ADDF.5010102@redhat.com \
--to=kraxel@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.