[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] open ptys in non-blocking mode.
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] open ptys in non-blocking mode. |
Date: |
Fri, 18 Jul 2008 11:14:11 +0200 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20071114) |
Gerd Hoffmann schrieb:
> Kevin Wolf wrote:
>> [Crossposting to xen-devel]
>>
>> Ian, we need something like this for qemu-xen (or ioemu-remote or
>> whatever it's called now). Currently you must attach to the console of a
>> domain, otherwise it won't boot up and keep hanging in a blocking write
>> because the buffer is full.
>>
>> The old ioemu had a hack in unix_write (doing a select before the write)
>> which you didn't merge into qemu-xen. In fact, I noticed that you even
>> removed that function entirely and I'm wondering why.
>
> For completeness: You also need the attached patch for unix_write,
> otherwise you'll end up with qemu burning cpu cycles. If you can't
> write to a non-blocking file handle the write will instantly return with
> -EAGAIN. Calling it again of course doesn't change the result, so
> better don't do that ...
As I metioned above, in qemu-xen there is no unix_write. It calls
write() directly instead. But if we wanted to re-introduce unix_write to
be closer to upstream qemu (I still don't know why unix_write was
dropped in the first place for qemu-xen - Ian?) you're right, of course.
Kevin