From nobody@FreeBSD.org  Thu Oct 28 16:20:17 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A37AE16A4CF
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 28 Oct 2004 16:20:17 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 91CE043D41
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 28 Oct 2004 16:20:17 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i9SGKHUk028977
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 28 Oct 2004 16:20:17 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i9SGKH2H028976;
	Thu, 28 Oct 2004 16:20:17 GMT
	(envelope-from nobody)
Message-Id: <200410281620.i9SGKH2H028976@www.freebsd.org>
Date: Thu, 28 Oct 2004 16:20:17 GMT
From: bob frazier <bobf@mrp3.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 'swap-in' causes several second hesitation on mouse and keyboard input
X-Send-Pr-Version: www-2.3

>Number:         73245
>Category:       kern
>Synopsis:       'swap-in' causes several second hesitation on mouse and keyboard input
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    vwe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 28 16:20:25 GMT 2004
>Closed-Date:    Sun May 11 18:45:07 UTC 2008
>Last-Modified:  Sun May 11 18:45:07 UTC 2008
>Originator:     bob frazier
>Release:        FreeBSD 5.3-STABLE #0
>Organization:
SFT Inc.
>Environment:
FreeBSD beater.SFT.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Thu Oct 21 12:05:12 PDT 2004     root@beater.SFT.local:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
when an inactive process 'swaps out', several seconds can pass before the process will accept any input again if the process is re-activated.  This primarily takes place while xorg is running, though it is not restricted to xorg.  Even 'sysmouse' can stall if there is no mouse motion for an extended period of time, such that moving the mouse does not cause the mouse pointer to move at ALL for several seconds.  Typically it shows up in applications running in the background, such as 'xterm', where switching focus to them in 'X' via the mouse or ALT+TAB (or using ALT+Fx or CTRL+ALT+Fx to switch to another console, INCLUDING a logged out console) and then immediately typing does not echo the keys typed for several seconds.
>How-To-Repeat:
a) run a gnome 2 session in xorg
b) open several applications (web browser, xterm sessions, e-mail, xchat, and so on).
c) use one of the applications for an extended period of time.  Leaving 'xchat' going in an active channel for 30 minutes should be sufficient.
d) use one of the normal methods (mouse motion, ALT+TAB, CTRL+ALT+Fx) to switch to a virtual console or a different application.  Type text in immediately.  Observe that in many cases, a delay occurs before the keys echo.

>Fix:
If you periodically 'activate' an application, the delay doesn't happen.  It only seems to happen when an application (including a logged off console) is not activated for a significant period of time.
>Release-Note:
>Audit-Trail:

From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: bob frazier <bobf@mrp3.com>
Cc: bug-followup@freebsd.org
Subject: Re: kern/73245: 'swap-in' causes several second hesitation on mouse and keyboard input
Date: Thu, 28 Oct 2004 23:38:19 +0300

 On 2004-10-28 16:20, bob frazier <bobf@mrp3.com> wrote:
 > when an inactive process 'swaps out', several seconds can pass before
 > the process will accept any input again if the process is
 > re-activated.  This primarily takes place while xorg is running,
 > though it is not restricted to xorg.
 
 I've seen this happen on CURRENT too.  After a bit of testing I found out that
 this does not happen if you set vm.swap_idle_enabled=0 in your `sysctl.conf'.
 
 Can you try this and let me know if it works for you too?
 
 Note though that this is a workaround, not a real fix of the real cause.
State-Changed-From-To: open->feedback 
State-Changed-By: rwatson 
State-Changed-When: Sat Mar 8 20:01:43 UTC 2008 
State-Changed-Why:  
It's been a while since this report was made; are you able to reproduce the 
problem on a recent (FreeBSD 7.0) release?  Since the time of this report, 
a lot of work has been done on user interactivity, removing the Giant lock 
from storage drivers and file systems, etc, all of which may have helped 
with (or eliminated) this issue.  Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73245 
State-Changed-From-To: feedback->suspended 
State-Changed-By: vwe 
State-Changed-When: Sat May 10 17:07:26 UTC 2008 
State-Changed-Why:  

this problem is believed to have been fixed (needs testing) 
suspending this ticket due to no feedback 
it will be closed after 5.x EOL date (soon!) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73245 
Responsible-Changed-From-To: freebsd-bugs->vwe 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Sat May 10 17:24:36 UTC 2008 
Responsible-Changed-Why:  

track for EOL 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73245 
State-Changed-From-To: suspended->closed 
State-Changed-By: vwe 
State-Changed-When: Sun May 11 18:43:38 UTC 2008 
State-Changed-Why:  

issue is reported as not occuring anymore. 
Quote from Bob by private mail: 
"this problem has not re-appeared for quite some time (I think it was specific to one particular version of 5.x)" 
Thanks Bob for reporting! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73245 
>Unformatted:
