[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] 8250: more realistic TX-done IRQ rate
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH] 8250: more realistic TX-done IRQ rate |
Date: |
Sat, 12 Apr 2008 17:48:05 +0100 |
User-agent: |
KMail/1.9.9 |
On Saturday 12 April 2008, Jan Kiszka wrote:
> The 8250 UART emulation currently raises a TX-done IRQ immediately when the
> guest writes out some character. This is problematic for guests like Linux
> which may flush its output buffer in a loop from IRQ context, because they
> may then enter a tight loop with IRQs disabled. In fact, Linux breaks out
> of this loop after some iterations and issue the well-known [1] "too much
> work for irq..." warning. And in case the console output is on the very
> same serial port, the console output is utterly corrupted.
Please see previous threads on this topic.
> Patch below addresses the issue by delaying the TX-done IRQ more
> realistically, ie. according to the currently set baudrate.
Unless the serial baud rate is extremely low (<1kbaud) this isn't going to
work with any sort of reliability. You have to fix this in a way that doesn't
require high resolution realtime response.
I'd also expect you to have the same problem with the RX queue. If you don't
it's a bug elsewhere in qemu.
> + qemu_mod_timer(s->tx_timer, 1000 / (11520 / s->divider));
This looks bogus. I think you're a few orders of magnitude out in your timing
calculations. As mentioned above, in practice you unlikely to get anywhere
near the necessary realtime performance out of qemu.
Paul