* Re: Serial stdio overwhelming interrupts
2008-08-13 7:27 Serial stdio overwhelming interrupts Liu Yu
@ 2008-08-13 12:46 ` Christian Ehrhardt
2008-08-15 2:08 ` Liu Yu
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Christian Ehrhardt @ 2008-08-13 12:46 UTC (permalink / raw)
To: kvm-ppc
Liu Yu wrote:
> Hi guys,
>
> In my kvm machine, I use serial as its default stdio.
> But when display a number of characters, e.g. cat a big ascii file,
> the serial always hangs as encount overwhelming interrupts, and then output a kernel log "serial8250: too much work for irq 42".
>
> I found that the serial in qemu is primitive so that it generate a interrupt on every single character.
> This make it easier to reach the threshold of reporting "too much work".
>
> I had to use the patch below to get this issue walked arroud.
>
> Have you guys ever met the serial hanging problem before?
>
We had that some times in the beginning while we brought up interrupts.
But since that time it did never occur again and I thought we fixed it.
Maybe your use case of catting a file to it is stressing it now to a new
extend triggering it again.
> ---
> diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
> index be95e55..af3e569 100644
> --- a/drivers/serial/8250.c
> +++ b/drivers/serial/8250.c
> @@ -70,7 +70,7 @@ static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS;
> #define DEBUG_INTR(fmt...) do { } while (0)
> #endif
>
> -#define PASS_LIMIT 256
> +#define PASS_LIMIT 65535
>
> /*
> * We default to IRQ0 for the "no irq" hack. Some
>
> Best Regards.
>
> Yu
> N�����r��y���b�X��ǧv�^�)޺{.n�+����jir)���w*\x1fjg���\x1e�����ݢj/���z�ޖ��2�ޙ���&�)ߡ�a��\x7f��\x1e�G���h�\x0f�j:+v���w�٥
--
Grüsse / regards,
Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: Serial stdio overwhelming interrupts
2008-08-13 7:27 Serial stdio overwhelming interrupts Liu Yu
2008-08-13 12:46 ` Christian Ehrhardt
@ 2008-08-15 2:08 ` Liu Yu
2008-08-18 16:07 ` Hollis Blanchard
2008-08-19 10:12 ` Liu Yu
3 siblings, 0 replies; 5+ messages in thread
From: Liu Yu @ 2008-08-15 2:08 UTC (permalink / raw)
To: kvm-ppc
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1464 bytes --]
> -----Original Message-----
> From: Christian Ehrhardt [mailto:ehrhardt@linux.vnet.ibm.com]
> Sent: Wednesday, August 13, 2008 8:47 PM
> To: Liu Yu
> Cc: kvm-ppc@vger.kernel.org
> Subject: Re: Serial stdio overwhelming interrupts
>
> Liu Yu wrote:
> > Hi guys,
> >
> > In my kvm machine, I use serial as its default stdio.
> > But when display a number of characters, e.g. cat a big ascii file,
> > the serial always hangs as encount overwhelming interrupts,
> and then output a kernel log "serial8250: too much work for irq 42".
> >
> > I found that the serial in qemu is primitive so that it
> generate a interrupt on every single character.
> > This make it easier to reach the threshold of reporting
> "too much work".
> >
> > I had to use the patch below to get this issue walked arroud.
> >
> > Have you guys ever met the serial hanging problem before?
> >
>
> We had that some times in the beginning while we brought up
> interrupts.
> But since that time it did never occur again and I thought we
> fixed it.
> Maybe your use case of catting a file to it is stressing it
> now to a new extend triggering it again.
>
I found this.
http://www.archivum.info/qemu-devel@nongnu.org/2008-02/msg00169.html
I donât know how it is going now. Because I still work on the branch kvm-70rc1 of qemu
Maybe it has been solved.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¤¾oé¥ÏâØ^nr¡ö¦zË\x1aëh¨èÚ&£ûàz¿äz¹Þú+Ê+zf£¢·h§~Ûiÿÿïêÿêçz_è®\x0fæj:+v¨þ)ߣøm
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: Serial stdio overwhelming interrupts
2008-08-13 7:27 Serial stdio overwhelming interrupts Liu Yu
2008-08-13 12:46 ` Christian Ehrhardt
2008-08-15 2:08 ` Liu Yu
@ 2008-08-18 16:07 ` Hollis Blanchard
2008-08-19 10:12 ` Liu Yu
3 siblings, 0 replies; 5+ messages in thread
From: Hollis Blanchard @ 2008-08-18 16:07 UTC (permalink / raw)
To: kvm-ppc
On Fri, 2008-08-15 at 10:08 +0800, Liu Yu wrote:
> > -----Original Message-----
> > From: Christian Ehrhardt [mailto:ehrhardt@linux.vnet.ibm.com]
> > Sent: Wednesday, August 13, 2008 8:47 PM
> > To: Liu Yu
> > Cc: kvm-ppc@vger.kernel.org
> > Subject: Re: Serial stdio overwhelming interrupts
> >
> > Liu Yu wrote:
> > > Hi guys,
> > >
> > > In my kvm machine, I use serial as its default stdio.
> > > But when display a number of characters, e.g. cat a big ascii file,
> > > the serial always hangs as encount overwhelming interrupts,
> > and then output a kernel log "serial8250: too much work for irq 42".
> > >
> > > I found that the serial in qemu is primitive so that it
> > generate a interrupt on every single character.
> > > This make it easier to reach the threshold of reporting
> > "too much work".
> > >
> > > I had to use the patch below to get this issue walked arroud.
> > >
> > > Have you guys ever met the serial hanging problem before?
> > >
> >
> > We had that some times in the beginning while we brought up
> > interrupts.
> > But since that time it did never occur again and I thought we
> > fixed it.
> > Maybe your use case of catting a file to it is stressing it
> > now to a new extend triggering it again.
> >
>
> I found this.
> http://www.archivum.info/qemu-devel@nongnu.org/2008-02/msg00169.html
> I don’t know how it is going now. Because I still work on the branch kvm-70rc1 of qemu
> Maybe it has been solved.
AFAIK it has not been solved, and neither Linux nor qemu developers plan
to change their behavior. In the URL above, a kernel developer suggests
changing qemu's behavior.
The problem is that the Linux driver reads serial data in a loop but
gives up after a fixed number (256) of iterations. I'm not sure why the
kernel does that, since I think interrupts are enabled while that
happens.
As a workaround you could use telnet or ssh to cat your large files.
You're welcome to reopen the discussion on the LKML and KVM lists.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Serial stdio overwhelming interrupts
2008-08-13 7:27 Serial stdio overwhelming interrupts Liu Yu
` (2 preceding siblings ...)
2008-08-18 16:07 ` Hollis Blanchard
@ 2008-08-19 10:12 ` Liu Yu
3 siblings, 0 replies; 5+ messages in thread
From: Liu Yu @ 2008-08-19 10:12 UTC (permalink / raw)
To: kvm-ppc
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1105 bytes --]
> -----Original Message-----
> From: Hollis Blanchard [mailto:hollisb@us.ibm.com]
> Sent: Tuesday, August 19, 2008 12:07 AM
> To: Liu Yu
> Cc: kvm-ppc@vger.kernel.org
> Subject: RE: Serial stdio overwhelming interrupts
>
> >
> > I found this.
> > http://www.archivum.info/qemu-devel@nongnu.org/2008-02/msg00169.html
> > I donât know how it is going now. Because I still work on
> the branch
> > kvm-70rc1 of qemu Maybe it has been solved.
>
> AFAIK it has not been solved, and neither Linux nor qemu
> developers plan to change their behavior. In the URL above, a
> kernel developer suggests changing qemu's behavior.
>
> The problem is that the Linux driver reads serial data in a
> loop but gives up after a fixed number (256) of iterations.
> I'm not sure why the kernel does that, since I think
> interrupts are enabled while that happens.
I agree.
Although serial in qemu doesnt support burst transmission,
kernel should be competent to handle any situation.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¤¾oé¥ÏâØ^nr¡ö¦zË\x1aëh¨èÚ&£ûàz¿äz¹Þú+Ê+zf£¢·h§~Ûiÿÿïêÿêçz_è®\x0fæj:+v¨þ)ߣøm
^ permalink raw reply [flat|nested] 5+ messages in thread