All of lore.kernel.org
 help / color / mirror / Atom feed
* Serial stdio overwhelming interrupts
@ 2008-08-13  7:27 Liu Yu
  2008-08-13 12:46 ` Christian Ehrhardt
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Liu Yu @ 2008-08-13  7:27 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 --]


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?

---
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Ç+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¤¾oé¥ÏâžØ^n‡r¡ö¦zË\x1aëh™¨è­Ú&£ûàz¿äz¹Þ—ú+€Ê+zf£¢·hšˆ§~†­†Ûiÿÿïêÿ‘êçz_è®\x0fæj:+v‰¨þ)ߣøm

^ permalink raw reply related	[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
                   ` (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é¥ÏâžØ^n‡r¡ö¦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é¥ÏâžØ^n‡r¡ö¦zË\x1aëh™¨è­Ú&£ûàz¿äz¹Þ—ú+€Ê+zf£¢·hšˆ§~†­†Ûiÿÿïêÿ‘êçz_è®\x0fæj:+v‰¨þ)ߣøm

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-19 10:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.