From owner-freebsd-arch@FreeBSD.ORG Tue May 27 19:34:04 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F962106566B for ; Tue, 27 May 2008 19:34:04 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 643548FC1A for ; Tue, 27 May 2008 19:34:04 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 2308C1CC1A; Tue, 27 May 2008 21:32:42 +0200 (CEST) Date: Tue, 27 May 2008 21:32:42 +0200 From: Ed Schouten To: Kostik Belousov Message-ID: <20080527193242.GN64397@hoeg.nl> References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> <20080527165753.GK64397@hoeg.nl> <20080527191302.GS21317@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="w6U88vdWm8UqIXvc" Content-Disposition: inline In-Reply-To: <20080527191302.GS21317@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2008 19:34:04 -0000 --w6U88vdWm8UqIXvc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kostik Belousov wrote: > On Tue, May 27, 2008 at 06:57:53PM +0200, Ed Schouten wrote: > >=20 > > Please take a look at src/usr.sbin/watch/watch.c:open_snp(). We might as > > well turn snp(4) into a single /dev/snp, where the kernel space driver > > uses per-descriptor data to distinguish the instances. This provides > > some advantages: > >=20 > > - No more silly open()-loops. > >=20 > > - A system administrator can change the permissions on /dev/snp, which > > automatically sets a system wide policy, instead on one of the device > > nodes. > >=20 > > - We don't fill up the system with a lot of unused nodes. > >=20 > > for i in `seq 1000` > > do > > ls /dev/bpf$i > /dev/null > > done > Please, do not overuse the cdevpriv data (I am not speaking about snp/wat= ch > ATM, each case requires careful decision). Using cdevpriv disables some > features that may be provided by the clones, i.e. actual cdevs. For examp= le, > you cannot have several independent opens operate on the same instance. I'll take a closer look at how it works when time permits. Do you mind if I commit the minor =3D=3D unit patch one of these days/weeks? Thanks for your feedback! --=20 Ed Schouten WWW: http://80386.nl/ --w6U88vdWm8UqIXvc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8YdoACgkQ52SDGA2eCwVN9ACcD/qYIOyAOCUT2zwPsmBvu535 9KEAmwe8lxDp0/kdSofmdU3QmFZvJzfO =74nM -----END PGP SIGNATURE----- --w6U88vdWm8UqIXvc--