From mhol@wkt.slip.adfa.edu.au Sat May  8 02:54:56 1999
Return-Path: <mhol@wkt.slip.adfa.edu.au>
Received: from wkt.slip.adfa.edu.au (wkt.slip.adfa.edu.au [131.236.2.210])
	by hub.freebsd.org (Postfix) with ESMTP id 6E9AC15256
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  8 May 1999 02:54:50 -0700 (PDT)
	(envelope-from mhol@wkt.slip.adfa.edu.au)
Received: (from mhol@localhost)
	by wkt.slip.adfa.edu.au (8.9.2/8.9.2) id TAA01225;
	Sat, 8 May 1999 19:56:38 +1000 (EST)
	(envelope-from mhol)
Message-Id: <199905080956.TAA01225@wkt.slip.adfa.edu.au>
Date: Sat, 8 May 1999 19:56:38 +1000 (EST)
From: mhol@wkt.slip.adfa.edu.au (Warren Toomey)
Reply-To: wkt@cs.adfa.edu.au (Warren Toomey)
To: FreeBSD-gnats-submit@freebsd.org
Subject: sio.c silo overflows during X usage
X-Send-Pr-Version: 3.2

>Number:         11575
>Category:       i386
>Synopsis:       sio.c silo overflows during X usage
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May  8 03:00:01 PDT 1999
>Closed-Date:    Wed Jun 23 17:52:02 PDT 1999
>Last-Modified:  Wed Jun 23 17:52:40 PDT 1999
>Originator:     Warren Toomey
>Release:        FreeBSD 3.1-STABLE i386
>Organization:
Personal
>Environment:

FreeBSD 3.1-STABLE kernel, Pentium II 266 with 64M,  XFree86 3.3.3.1

sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa
sio0: type 16550A
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16550A

/sys/i386/isa/sio.c 1.224.2.5 1999/04/13 18:54:43 jhay

Kernel ppp running on sio1 (i.e /dev/ttyd1) at 38400bps, connected to
a 33K external modem. stty flags were:

ppp disc; speed 38400 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
        -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
        -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel ignbrk
        -brkint -inpck ignpar -parmrk
oflags: -opost -onlcr -oxtabs
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb crtscts -dsrflow
        -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
        eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
        min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
        stop = ^S; susp = ^Z; time = 0; werase = ^W;

At time of problem, the following processes were running

  PID  TT  STAT      TIME COMMAND
    0  ??  DLs    0:00.00  (swapper)
    1  ??  Ss     0:00.01 /sbin/init --
    2  ??  DL     0:00.00  (pagedaemon)
    3  ??  DL     0:00.00  (vmdaemon)
    4  ??  DL     0:00.27  (syncer)
  108  ??  Is     0:02.00 syslogd
  233  ??  R      2:03.86 /usr/X11R6/bin/Xwrapper :0 (XF86_SVGA)
  259  ??  Ss     0:00.20 moused -p /dev/cuaa0 -t mousesystems
  313  ??  Is     0:00.01 pppd
  254  p0  Ss     0:00.23 -csh (tcsh)
  415  p0  R+     0:00.00 ps -ax
  253  p1  Is+    0:00.12 -tcsh (tcsh)
  225  v0  Is+    0:00.11 /bin/sh /usr/X11R6/bin/startx
  232  v0  I+     0:00.04 xinit /usr/home/mhol/.xinitrc --
  239  v0  S      0:00.26 fvwm
  248  v0  S      0:00.33 xterm -e tcsh
  249  v0  S      0:00.50 xterm -C
  226  v1  Is+    0:00.01 /usr/libexec/getty Pc ttyv1
  227  v2  Is+    0:00.01 /usr/libexec/getty Pc ttyv2

>Description:

Serial port silo overflows occur on sio1 (i.e /dev/ttyd1), using kernel
ppp, when there is heavy X display activity. When X is not running, or
when little X activity is occurring, no silo overflows occur. In fact,
with X quiescent, and the system load >8 (due to several while(1) ;
processes) there are no silo overflows.

When windows are moved around, scrolling is done within a text window,
of when x11perf -all is running, silo overflows go from none at all to
several per second.

There is no other system activity (no disk activity, no mouse activity,
no incoming LAN packets, no other I/O activity). Although I generally
use natd, this was also disabled during the test.

>How-To-Repeat:

Start X windows. Start kernel-mode ppp to an ISP, using an external 33K modem.
Once connected, begin a large ftp download which you know will saturate
the link. Note the complete lack of silo overflows.

Begin to perform heavy text scrolling within an xterm window (e.g du -a /usr),
or run x11perf -all. Note several silo overflows per second, which causes
chronic stalls in the FTP transfer, and severe incoming packet losses.

>Fix:

	No fix known at this time. I notice that /sys/i386/isa/sio.c
has been moved to /sys/isa/sio.c in -CURRENT, and at least one
revision mentions silo overflows (1.225). However, I am unable to
merge this change into my 3.1-STABLE /sys/i386/isa/sio.c

>Release-Note:
>Audit-Trail:

From: Warren Toomey <wkt@henry.cs.adfa.edu.au>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: i386/11575: sio.c silo overflows during X usage
Date: Mon, 10 May 1999 19:36:47 +1000 (EST)

 I have found a workaround to this problem. I have a 3DImage975 AGP video
 card, and I'm using the XFree86 3.3.3.1 SVGA X server which has acceleration
 for this card. If I disable this acceleration, there are no sio.c silo
 overflows in FreeBSD-3.1-STABLE.
 
 Relevant kernel dmesgs and X server output when running with no acceleration:
 
 vga0: <Trident model 9750 VGA-compatible display device> rev 0xf3 int a
         irq 12 on pci1.1.0
 vga0 at 0x3b0-0x3df maddr 0xa0000 msize 131072 on isa
 
 XFree86 Version 3.3.3.1 / X Window System
 (protocol Version 11, revision 0, vendor release 6300)
 Release Date: December 29 1998
 Operating System: FreeBSD 3.0-CURRENT i386 [ELF] 
 Configured drivers:
   SVGA: server for SVGA graphics adaptors (Patchlevel 0):
       tvga8200lx, tvga8800cs, tvga8900b, tvga8900c, tvga8900cl, tvga8900d,
       tvga9000, tvga9000i, tvga9100b, tvga9200cxr, tgui9400cxi, tgui9420,
       tgui9420dgi, tgui9430dgi, tgui9440agi, cyber9320, tgui9660, tgui9680,
       tgui9682, tgui9685, cyber9382, cyber9385, cyber9388, cyber9397,
       cyber9520, 3dimage975, 3dimage985, generic
 Using syscons driver with X support (version 2.0)
 (using VT number 4)
 
 XF86Config: /etc/XF86Config
 (--) Trident chipset version: 0xf3 (3DImage975)
 (--) SVGA: Revision 0.
 (--) SVGA: TV interface is NTSC
 (--) SVGA: DAC is enabled for TV
 (--) SVGA: VGA display is connected.
 (--) SVGA: Using Trident programmable clocks
 (--) SVGA: chipset:  3dimage975
 (--) SVGA: videoram: 4096k
 (**) SVGA: Option "noaccel"
 (**) SVGA: Using 16 bpp, Depth 16, Color weight: 565
 (--) SVGA: Maximum allowed dot-clock: 230.000 MHz
 (**) SVGA: Mode "1024x768": mode clock =  65.000
 (**) SVGA: Mode "800x600": mode clock =  50.000
 (**) SVGA: Mode "640x480": mode clock =  36.000
 (--) SVGA: Virtual resolution set to 1024x768
 (--) SVGA: Using Linear Frame Buffer at 0x0d8000000, Size 4MB
 (**) SVGA: Disabled Graphics Engine.
 
 so perhaps something in the acceleration code is causing silo overflows.
 Perhaps it's because the use of the AGP bus locks out interrupts from
 the UART? I haven't had any mouse problems, tho.
 
 Thanks,
 	Warren
 
State-Changed-From-To: open->closed 
State-Changed-By: msmith 
State-Changed-When: Wed Jun 23 17:52:02 PDT 1999 
State-Changed-Why:  

Problem is either hardware, or XFree86 disabling interrupts during accelerated 
operations.  Neither are FreeBSD issues. 
>Unformatted:
