[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 0/5] chardev, virtio-console: flow control, erro
From: |
Amit Shah |
Subject: |
[Qemu-devel] Re: [PATCH 0/5] chardev, virtio-console: flow control, error handling |
Date: |
Tue, 6 Apr 2010 13:22:42 +0530 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On (Tue) Apr 06 2010 [09:36:17], Gerd Hoffmann wrote:
> Hi,
>
>> In case of EAGAIN, the unix_write() function just kept spinning while
>> attempting to write to the chardev till it succeeded. This resulted in
>> a stuck VM in case a chardev had opened connection but wasn't reading
>> anything from qemu.
>
> It spins only for non-blocking file handles. In blocking mode the write
> syscall just goes sleep until it can write out data (or gets a signal).
True. I'm interesting in non-blocking files for now.
>> There are two fixes for that case:
>> - Poll for POLLOUT instead of directly attempting write(), which helps
>> relax the CPU (and we become greener).
>
> No need to do that, see above. Having a poll() call in unix_write() is
> wrong IMHO.
So you mean just return -EAGAIN in case write returns with -EAGAIN?
Yeah, makes sense.
>> - If the file that we're writing to is nonblocking, return -EAGAIN to
>> the caller of qemu_chr_write() so that appropriate actions can be
>> taken higher up in the stack.
>
> Good.
Amit
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, (continued)
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Amit Shah, 2010/04/05
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Paul Brook, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Amit Shah, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Gerd Hoffmann, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Amit Shah, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Gerd Hoffmann, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Jamie Lokier, 2010/04/06
[Qemu-devel] Re: [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Gerd Hoffmann, 2010/04/06
[Qemu-devel] Re: [PATCH 0/5] chardev, virtio-console: flow control, error handling, Gerd Hoffmann, 2010/04/06
- [Qemu-devel] Re: [PATCH 0/5] chardev, virtio-console: flow control, error handling,
Amit Shah <=