From owner-freebsd-usb@FreeBSD.ORG Sun Oct 4 14:53:39 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D614106568B for ; Sun, 4 Oct 2009 14:53:39 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id EFF9D8FC13 for ; Sun, 4 Oct 2009 14:53:38 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,503,1249250400"; d="scan'208";a="284595738" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER05.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay1.uni-muenster.de with ESMTP; 04 Oct 2009 16:53:37 +0200 Received: by ZIVMAILUSER05.UNI-MUENSTER.DE (Postfix, from userid 149459) id 00D611B07E5; Sun, 4 Oct 2009 16:53:36 +0200 (CEST) Date: Sun, 04 Oct 2009 16:53:36 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Hans Petter Selasky , Andrew Thompson Message-ID: In-Reply-To: <200910041635.24139.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: mouse behaving strange on high cpu load and rapid movements X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 14:53:39 -0000 Hans Petter Selasky schrieb am 2009-10-04: > On Sunday 04 October 2009 14:44:34 Alexander Best wrote: > > Hans Petter Selasky schrieb am 2009-10-01: > > > On Wednesday 30 September 2009 15:23:18 Alexander Best wrote: > > > > here's some debug output: > > also i've notice that during heavy cpu load my keyboard's input > > rate is > > much lower than usual. > > i'll try producing a few benchmark results when writing/reading to > > a usb > > stick under heavy cpu load to give you an idea about the slowdown > > rate. > Hi, > If you look at the top of usb_process() in sys/dev/usb/usb_process.c, > then you > see there is some code to do priority settings. Recently something > about the > USB processes/threads was changed in USB regard, and I don't know if > this > might be the cause. Andrew, you might want to check if the priority > settings > in the USB code are still valid. > I'm currently using the BSD scheduler, not ULE. > --HPS i did some more tests. first i attached a different mouse and in fact you were right: the other mouse wasn't producing random copy&pastes during movements. however the mouse was also behaving sloppy. so i think there is in fact a priority problem somewhere. here are some SCHED/SMP tests i made: SMP enabled + SCHED_ULE: sloppy mouse/keyboard SMP disabled + SCHED_ULE: no problems SMP enabled + SCHED_4BSD: no porblems i did some bencmarking under SCHED_ULE + SMP enabled using the following command `time dd if=/dev/zero of=/mnt/umass/test bs=1m count=100`. here are the results: without cpu intensive tasks running: 100+0 records in 100+0 records out 104857600 bytes transferred in 26.391317 secs (3973186 bytes/sec) real 0m26.409s user 0m0.000s sys 0m1.385s with cpu intensive tasks running: 100+0 records in 100+0 records out 104857600 bytes transferred in 41.911261 secs (2501896 bytes/sec) real 0m42.748s user 0m0.009s sys 0m0.376s i've also switched to the 4BSD scheduler and everything's fine now. to produce heavy cpu load i compiled www/firefox35 and simultaniously ran this app: #include void tower(int n, int source, int target, int help) { if (n >= 1) { turm(n-1, source, help, target); turm(n-1, help, target, source); } } int main() { tower(10000, 1, 3, 2); } cheers. alex