From owner-freebsd-current@FreeBSD.ORG Mon Nov 15 08:31:22 2004 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 3B9EE16A4CE for ; Mon, 15 Nov 2004 08:31:22 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01ADE43D2D for ; Mon, 15 Nov 2004 08:31:22 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 26324 invoked from network); 15 Nov 2004 08:31:21 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail3.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 15 Nov 2004 08:31:21 -0000 Received: from hydrogen.funkthat.com (gfelop@localhost.funkthat.com [127.0.0.1])iAF8VKB6060220; Mon, 15 Nov 2004 00:31:20 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id iAF8VKua060219; Mon, 15 Nov 2004 00:31:20 -0800 (PST) Date: Mon, 15 Nov 2004 00:31:20 -0800 From: John-Mark Gurney To: Scott Long Message-ID: <20041115083120.GI57546@funkthat.com> Mail-Followup-To: Scott Long , "M. Warner Losh" , current@freebsd.org References: <20041112.143439.33211003.imp@bsdimp.com> <41952FBD.40602@freebsd.org> <20041115080155.GH57546@funkthat.com> <41986351.2070806@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41986351.2070806@freebsd.org> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: current@freebsd.org cc: "M. Warner Losh" Subject: Re: usb with fast interrupts X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2004 08:31:22 -0000 Scott Long wrote this message on Mon, Nov 15, 2004 at 01:05 -0700: > John-Mark Gurney wrote: > >Scott Long wrote this message on Fri, Nov 12, 2004 at 14:48 -0700: > > > >>M. Warner Losh wrote: > >> > >>>Our usb system supports soft interrupts, but we currently don't make > >>>productive use of them. The following makes interrupts fast > >>>interrupts and uses taskqueues to queue data to a SWI. > >>> > >>>Lemme know if it works for you. > >> > >>Taskqueues aren't good for timing-sensitive operations. Even though USB > >>may not be terribly sensitive, I bet you'll actually see performance > >>drops with things like umass with this. Could you instead just put the > >>real handler into a kthread and wake it up, or use a swi? > > > > > >If you need low latency, I made taskqueue's easier to create: > >TASKQUEUE_DEFINE_THREAD(kqueue); > > > >and then use: > > taskqueue_enqueue(taskqueue_kqueue, &kq->kq_task); > > > >of course replace kqueue w/ your own string... Check the taskqueue(9) > >man page for more details. > > > > So the only problem with TASKQUEUE_DEFINE_THREAD() is that it appears > impossible at the moment to clean up the thread that this creates when > the driver wants to unload. That shouldn't be too hard to fix. :) -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."