From owner-freebsd-usb@FreeBSD.ORG Wed Dec 14 21:59:10 2011 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5A78106564A; Wed, 14 Dec 2011 21:59:10 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.c2i.net [212.247.154.162]) by mx1.freebsd.org (Postfix) with ESMTP id 637A48FC0A; Wed, 14 Dec 2011 21:59:09 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 215899356; Wed, 14 Dec 2011 22:59:05 +0100 From: Hans Petter Selasky To: Andriy Gapon Date: Wed, 14 Dec 2011 22:56:32 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <4EE51CB5.1060505@FreeBSD.org> <4EE70A1F.8040406@FreeBSD.org> <4EE8C2CE.40909@FreeBSD.org> In-Reply-To: <4EE8C2CE.40909@FreeBSD.org> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201112142256.32526.hselasky@c2i.net> Cc: usb@freebsd.org, freebsd-hackers@freebsd.org, John Baldwin , mdf@freebsd.org Subject: Re: kern_yield vs ukbd_yield 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: Wed, 14 Dec 2011 21:59:10 -0000 On Wednesday 14 December 2011 16:37:50 Andriy Gapon wrote: > on 13/12/2011 10:17 Andriy Gapon said the following: > > on 13/12/2011 00:21 Andriy Gapon said the following: > [snip] >=20 > > And in the view of the below data I would like us to revisit this > > problem. I looked over usb code and it seems that all usb threads are > > created with priorities of either USB_PRI_MED or USB_PRI_HIGH, which > > translates to PI_SWI(SWI_CAMBIO) and PI_SWI(SWI_NET). These priorities > > should be in the ithread range, so it's kind of surprising that the init > > thread (with PVM priority) can cause troubles for them. >=20 > So, Hans Petter, do you recall any details of this problem? > I am curious about which thread got starved by which. =46rom what I know this was 100% reproducible. Remove the ukbd_yield() when at the mountroot prompt. Result: cannot type a= ny=20 keys. No USB devices will enumerate! >=20 > BTW, given your recent improvements to pause(9) what do you think about > further extending it to also use DELAY(9) when kdb_active is set or when > SCHEDULER_STOPPED() is true?=20 I think this is a good idea. It already checks for "cold". USB usually does= n't=20 use this function though when polling. > Then, probably, pause(9) could be used for > both branches in ukbd_do_poll and they could be collapsed together. =2D-HPS