qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Jan Kiszka <jan.kiszka@web.de>
Subject: Re: [Qemu-devel] [PATCH] 8250: more realistic TX-done IRQ rate
Date: Sat, 12 Apr 2008 17:48:05 +0100	[thread overview]
Message-ID: <200804121748.06132.paul@codesourcery.com> (raw)
In-Reply-To: <4800CDAE.3090606@web.de>

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

  parent reply	other threads:[~2008-04-12 16:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-12 14:56 [Qemu-devel] [PATCH] 8250: more realistic TX-done IRQ rate Jan Kiszka
2008-04-12 16:47 ` [Qemu-devel] " Jan Kiszka
2008-04-12 16:48 ` Paul Brook [this message]
2008-04-12 17:11   ` [Qemu-devel] " Jan Kiszka
2008-04-13  8:05     ` Jan Kiszka

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=200804121748.06132.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=jan.kiszka@web.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).