From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 07:24:52 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ECB11065676; Mon, 3 Aug 2009 07:24:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9A7438FC12; Mon, 3 Aug 2009 07:24:51 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n737LGSt017734; Mon, 3 Aug 2009 01:21:16 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 03 Aug 2009 01:22:06 -0600 (MDT) Message-Id: <20090803.012206.1492586399.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200908030827.21108.hselasky@c2i.net> References: <20090802192902.GS47463@elvis.mu.org> <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> <200908030827.21108.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, alfred@FreeBSD.org, rwatson@FreeBSD.org, nparhar@gmail.com, svn-src-head@FreeBSD.org Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 07:24:52 -0000 In message: <200908030827.21108.hselasky@c2i.net> Hans Petter Selasky writes: : On Sunday 02 August 2009 21:58:14 Robert N. M. Watson wrote: : > On 2 Aug 2009, at 20:29, Alfred Perlstein wrote: : > > * Robert Watson [090801 15:15] wrote: : > >> On Sat, 1 Aug 2009, Hans Petter Selasky wrote: : > >>>>> This has slowed down core dumps very significantly. What used : > >>>>> to take : > >>>>> 10-15s on my system now takes around 3 minutes. A simple test : > >>>>> is to : > >>>>> break into ddb and "call doadump" with or without this rev. I : > >>>>> have a : > >>>>> serial console on this machine and so I can use ddb whether the : > >>>>> attached : > >>>>> USB keyboard works or not. : > >>> : > >>> It's because there is a DELAY(1000) in the UKBD's polling routine : > >>> so that : > >>> key- repeating will work, no magic. : > >> : > >> Given a choice between dumping 10x faster and having automatic key : > >> repeat : > >> in DDB, I'd lean towards the former. :-) : > > : > > Robert, and *@freebsd.org, : > > : > > Hans should be back in a day or so to address this. If critical I can : > > probably back out the offending code, but I think it makes sense to : > > wait a few days more for a more comprehensive fix. : > : > That's my feeling too -- however, I think it would be useful to : > generate a small concept test patch that disables the key repeat : > behavior and see if it restores some/all performance. Scott's argument : > suggests only some, but perhaps we'd get quite a bit, which is what : > we're looking for. We wouldn't commit the patch but it would let us : > know we're on the right track. : : Hi, : : I'm back. : : I see two solutions: : : 1) Disable the timekeeping if no keys are pressed. : : 2) Second option is to use getmicrotime. Actually what I need is just a : millisecond time reference so I know when to repeat the last key. : : Any opinions? DELAY() or getmicrotime() ? I'd note the state at each poll, and if > 1ms has passed since the down event, I'd repeat. I wouldn't use DELAY at all to see if you needed to repeat: I'd let the clocking of the polling drive you here (eg, you know that someone else will call it a lot, so leverage that to avoid the delay). Warner