From owner-freebsd-current@FreeBSD.ORG Thu Aug 9 05:30:22 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60BD5106566B for ; Thu, 9 Aug 2012 05:30:22 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id D82128FC08 for ; Thu, 9 Aug 2012 05:30:21 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 305643886; Thu, 09 Aug 2012 07:30:13 +0200 From: Hans Petter Selasky To: Konstantin Belousov Date: Thu, 9 Aug 2012 07:30:43 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <20120801160323.GN2676@deviant.kiev.zoral.com.ua> <201208081942.24619.hselasky@c2i.net> <20120808215155.GP2676@deviant.kiev.zoral.com.ua> In-Reply-To: <20120808215155.GP2676@deviant.kiev.zoral.com.ua> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201208090730.43919.hselasky@c2i.net> Cc: Ed Schouten , freebsd-current@freebsd.org Subject: Re: ttydev_cdevsw has no d_purge X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2012 05:30:22 -0000 On Wednesday 08 August 2012 23:51:55 Konstantin Belousov wrote: > On Wed, Aug 08, 2012 at 07:42:24PM +0200, Hans Petter Selasky wrote: > > On Wednesday 08 August 2012 19:24:18 Ed Schouten wrote: > > > 2012/8/8 Hans Petter Selasky : > > > >> I have a question regarding the changed fragment of code. Why don't > > > >> you use unr(9) KPI to manage unit numbers ? > > > > > > > > Probably I could, but right now the unr interface doesn't support > > > > pending unit free which I need for other reasons, see below. > > > > > > What does `pending unit free' mean? I also would prefer it if you used > > > unr(9) -- not just here, but across the entire USB stack. > > > > It is like a drain state, where a unit is collected for free, and then > > committed to free state when the tsw_free() is called. In the [unlocked] > > time in between the unit cannot be re-used. > > Still, why do you need such intermediate state ? You cannot reuse the unit > number while it is in the 'pending free' still, AFAIU. Because of the order in which structures are freed. See other e-mail. --HPS