Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Nov 2011 16:45:58 +0100
From:      Baptiste Daroussin <bapt@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-current@freebsd.org, imp@freebsd.org
Subject:   Re: [patch] turning devctl into a "multiple openable" device
Message-ID:  <20111130154558.GA1621@azathoth.lan>
In-Reply-To: <201111301005.11938.jhb@freebsd.org>
References:  <20111130124320.GA1449@azathoth.lan> <201111301005.11938.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111130154558.GA1621>