From owner-freebsd-bugs@FreeBSD.ORG Fri Jun 24 17:29:22 2011 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E26C1106566B for ; Fri, 24 Jun 2011 17:29:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 99E258FC13 for ; Fri, 24 Jun 2011 17:29:22 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p5OHLa40022387 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 24 Jun 2011 11:21:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201106241511.44977.hselasky@c2i.net> Date: Fri, 24 Jun 2011 11:21:05 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201106151523.p5FFN73i075030@red.freebsd.org> <201106241246.51881.hselasky@c2i.net> <201106241511.44977.hselasky@c2i.net> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Fri, 24 Jun 2011 11:21:39 -0600 (MDT) Cc: freebsd-bugs@FreeBSD.org, freebsd-hackers@FreeBSD.org, Robert Millan , freebsd-current@FreeBSD.org, freebsd-usb@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org Subject: Re: misc/157903: automated kldload for USB class devices X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2011 17:29:23 -0000 On Jun 24, 2011, at 7:11 AM, Hans Petter Selasky wrote: > On Friday 24 June 2011 14:59:37 Robert Millan wrote: >> 2011/6/24 Hans Petter Selasky : >>>> Very nice. But why not use variable names instead of hardcoding >>>> numbers? It makes the output much easier to understand. >>>=20 >>> To save memory. >>=20 >> I haven't inspected devd code, but I was under the assumption that >> variables only lived untill resolved. What would be the point of = keeping >> them in memory after devd has finished parsing the config files? >=20 > Hi, >=20 > I haven't checked that, though if you want the readable version, then = you need=20 > to check the source code. >=20 > However I could add some code to print a vendor ID comment, based on = usbdevs. devd keeps them in memory and expands them when the commands are = executed. It will use more memory and be slower if you have lots of = variables. Now much more memory and how much slower? I kinda doubt = you'd notice on modern gear. Warner