From owner-freebsd-current@FreeBSD.ORG Wed Nov 5 19:30:49 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5999A16A4CE for ; Wed, 5 Nov 2003 19:30:49 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id D074843FE5 for ; Wed, 5 Nov 2003 19:30:47 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 21391 invoked by uid 1002); 6 Nov 2003 03:30:45 -0000 Received: from unknown (HELO ?10.4.1.5?) (64.58.1.252) by smtp.mho.net with SMTP; 6 Nov 2003 03:30:45 -0000 Date: Wed, 5 Nov 2003 20:33:58 -0700 (MST) From: Scott Long X-X-Sender: scottl@pooker.samsco.home To: Morten Johansen In-Reply-To: <3FA966B2.9040704@morten-johansen.net> Message-ID: <20031105202947.A43448@pooker.samsco.home> References: <3FA966B2.9040704@morten-johansen.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org cc: Robert Watson Subject: Re: the PS/2 mouse problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2003 03:30:49 -0000 One thought that I had was to make psmintr() be INTR_FAST. I need to stare at the code some more to fully understand it, but it looks like it wouldn't be all that hard to do. Basically just use the interrupt handler to pull all of the data out of the hardware and into a ring buffer in memory, and then a fast taskqueue to process that ring buffer. It would at least answer the question of whether the observed problems are due to ithread latency. And if done right, no locks would be needed in psmintr(). Scott On Wed, 5 Nov 2003, Morten Johansen wrote: > Robert Watson wrote: > > There's been some speculation that the PS/2 mouse problem could be due to > > high interrupt latency for non-fast interrupt handlers (especially ones > > not MPSAFE) in 5.x. I think it would make a lot of sense for us to push > > Giant off both the PS/2 mouse and syscons interrupt handlers in the near > > future. For syscons, this would also improve the reliability of dropping > > into the debugger from a non-serial console. > > > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > > robert@fledge.watson.org Network Associates Laboratories > > > Hi, > I tried pushing Giant out of psm a while ago, a patch is attached. > It did not help, but probably eases contention on Giant a bit. > psm gets a lot of interrupts. > I am still seeing occasional weirdness from the mouse. > It freezes then goes berserk (moving and triggering events) for a few > seconds. > The kernel says: > psmintr: delay too long; resetting byte count > (I was wrong about the message in a previous mail) > > This actually happens more often in -stable than in -current. > moused or not does not make a difference. > The latest SCHED_ULE and interrupt changes, have not fixed this problem. > > Otherwise, FreeBSD 5-current is the best OS I have ever run. > > > Morten Johansen > > >