Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2005 13:11:15 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        nate@root.org
Cc:        current@FreeBSD.org
Subject:   Re: Patch to make powerd(8) devd(8)-aware
Message-ID:  <20050519.131115.87763610.imp@bsdimp.com>
In-Reply-To: <428CE32F.20307@root.org>
References:  <428C1EA6.7020907@root.org> <20050519104207.GA1259@shapeshifter.se> <428CE32F.20307@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <428CE32F.20307@root.org>
            Nate Lawson <nate@root.org> writes:
: Fredrik Lindberg wrote:
: > On Wed, May 18, 2005 at 10:05:42PM -0700, Nate Lawson (nate@root.org) wrote:
: > 
: >>I appreciate you working on a patch for this.  However, I'd prefer the 
: >>work on the devd side go into making devctl a clonable device or follow 
: >>the bpf route and hook up /dev/devctl0,1,2,...  If you start using the 
: >>/var/run/devd.pipe, it's not available for other consumers.
: > 
: > Yes, devctl should probably be able to have more readers, I won't argue with that.
: > However, devd allows any number of consumers to the devd.pipe. I've had
: > upto 4 programs reading devd.pipe simultaneously and they all got the same data.
: 
: Ah, I wasn't aware of that.  I thought there might be a race for who got 
: each message.  This is fine then, and perhaps we should retire devctl as 
: a way to read messages since it is limited for that purpose and 
: duplicates the pipe.  We could keep it around for reverse signaling 
: (sending messages to the kernel, which is needed eventually).

Ummm, devctl is the way that devd gets its info that it distributes to
the pipe from the kernel.  Can't easily eliminate it.  The plan is
also to add ioctls and/or sysctl so that devices can be told to
detach, power off, etc.  The exact form of these messages is still
TBD.

Warner



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