From owner-freebsd-current@FreeBSD.ORG Wed Nov 30 15:46:03 2011 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 40E26106566B; Wed, 30 Nov 2011 15:46:03 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0F89D8FC16; Wed, 30 Nov 2011 15:46:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pAUFk2ja019082; Wed, 30 Nov 2011 15:46:02 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pAUFk28J019081; Wed, 30 Nov 2011 15:46:02 GMT (envelope-from bapt@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@freebsd.org using -f Date: Wed, 30 Nov 2011 16:45:58 +0100 From: Baptiste Daroussin To: John Baldwin Message-ID: <20111130154558.GA1621@azathoth.lan> References: <20111130124320.GA1449@azathoth.lan> <201111301005.11938.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline In-Reply-To: <201111301005.11938.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@freebsd.org, imp@freebsd.org Subject: Re: [patch] turning devctl into a "multiple openable" device 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: Wed, 30 Nov 2011 15:46:03 -0000 --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 30, 2011 at 10:05:11AM -0500, John Baldwin wrote: > On Wednesday, November 30, 2011 7:43:20 am Baptiste Daroussin wrote: > > Hi all, > >=20 > > With the help of cognet, I wrote a patch to turn devctl into a multiple= openable > > device, that mean that it will allow to open /dev/devctl in multiple pr= ograms, > > for example hald and everythings that want to receive notification from= the > > device won't need to depend on haveing devd running. > >=20 > > here is the patch:=20 > > http://people.freebsd.org/~bapt/devctl_multi_open.diff >=20 > Shouldn't devctl_queue_data_f() use the requested malloc() flags instead = of > hardcoding M_NOWAIT? you are right, I'll fix that. >=20 > Also, I know that it was an intentional design decisison by Warner to have > the multiplexing of devctl data done in userland via devd rather than in = the > kernel. (I think he envisioned devd providing a UNIX domain socket or so= me > such for other daemons to use to listen to events.) Have you asked him a= bout > this change? I haven't discussed this with him, I just CC him now to have his opinion. In fact for somecase I find useful to have useland application able to get notification from device without having devd running at all plus the devctl= (4) manpage says:=20 " This design allows only one reader for /dev/devctl. This is not desirabl= e in the long run, but will get a lot of hair out of this implementation. Maybe= we should make this device a clonable device." that's why I didn't first spoke to Warner about this, which has been a mist= ake sorry about that. regards, Bapt --UlVJffcvxoiEqYs2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7WT7YACgkQ8kTtMUmk6EyHnwCfW2HegLplMqZg+jXgCd8BzEIl azMAnj1f6SZEzzZCONTDQy6KwggUPOSF =1sck -----END PGP SIGNATURE----- --UlVJffcvxoiEqYs2--