From owner-freebsd-usb@FreeBSD.ORG Thu Jan 13 08:55:15 2011 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 3F4471065679 for ; Thu, 13 Jan 2011 08:55:15 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id 90B6B8FC15 for ; Thu, 13 Jan 2011 08:55:14 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=V/BmsFzUvwB31XiPFgiZP9ZGx4++v9AH3cfAZ6JEaj8= c=1 sm=1 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=X3RZM1FL2p_AsrGhbWYA:9 a=21BOdbpAgCNGCneIknMToxkL0AMA:4 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 73534369; Thu, 13 Jan 2011 09:55:12 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 13 Jan 2011 09:55:15 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <201101121703.37226.jhb@freebsd.org> In-Reply-To: <201101121703.37226.jhb@freebsd.org> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201101130955.15676.hselasky@c2i.net> Cc: John Baldwin Subject: Re: Adjust USB kthread priorities 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: Thu, 13 Jan 2011 08:55:15 -0000 On Wednesday 12 January 2011 23:03:37 John Baldwin wrote: > Currently the USB kthreads created for each USB bus use hardware interrupt > priorities. I think this is wrong and that they should use software > interrupt priorities instead. This patch would do that: > > --- //depot/projects/smpng/sys/dev/usb/usb_process.h 2009-08-25 > 21:12:15.000000000 0000 +++ > //depot/user/jhb/socket/dev/usb/usb_process.h 2010-12-21 > 20:30:04.000000000 0000 @@ -27,11 +27,13 @@ > #ifndef _USB_PROCESS_H_ > #define _USB_PROCESS_H_ > > +#include > #include > +#include > > /* defines */ > -#define USB_PRI_HIGH PI_NET > -#define USB_PRI_MED PI_DISK > +#define USB_PRI_HIGH PI_SWI(SWI_NET) > +#define USB_PRI_MED PI_SWI(SWI_CAMBIO) > > #define USB_PROC_WAIT_TIMEOUT 2 > #define USB_PROC_WAIT_DRAIN 1 Your suggestion is OK. The priority assignments were made to avoid USB threads competing with other userland threads. --HPS