From owner-acpi-jp@jp.freebsd.org  Fri Dec 15 18:52:24 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id SAA52714;
	Fri, 15 Dec 2000 18:52:24 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from mass.osd.bsdi.com (adsl-63-202-177-71.dsl.snfc21.pacbell.net [63.202.177.71])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id SAA52708;
	Fri, 15 Dec 2000 18:52:19 +0900 (JST)
	(envelope-from msmith@mass.osd.bsdi.com)
Received: from mass.osd.bsdi.com (localhost [127.0.0.1])
	by mass.osd.bsdi.com (8.11.1/8.11.1) with ESMTP id eBFA2Ro02884;
	Fri, 15 Dec 2000 02:02:28 -0800 (PST)
	(envelope-from msmith@mass.osd.bsdi.com)
Message-Id: <200012151002.eBFA2Ro02884@mass.osd.bsdi.com>
X-Mailer: exmh version 2.1.1 10/15/1999
To: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
cc: acpi-jp@jp.FreeBSD.org
In-reply-to: Your message of "Fri, 15 Dec 2000 16:00:54 +0900."
             <20001215160054A.iwasaki@jp.FreeBSD.org> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Fri, 15 Dec 2000 02:02:27 -0800
From: Mike Smith <msmith@freebsd.org>
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 974
Subject: [acpi-jp 974] Re: Some power device driver. 
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: msmith@freebsd.org

> > > BTW, How about daemon programs which need event notification mechanism
> > > such as select/poll/kqueue?  I think we'd better to have dedicated 
> > > control files for this purpose.
> > 
> > Er, why?  kqueue doesn't use control files at all.  I would definitely 
> > recommend using it for acpi->userland notification.
> 
> Yes, I think it's one of the advantages from the other.  I just
> enumerated kqueue as one of the event notification mechanisms.

Kqueue is really the only sensible way to implement this.

> One thing I'm concerning about using kqueue is API
> compatibility/portability among *BSDs.  I'm not sure this is FreeBSD
> specific API or they've had it already or have any plan to implement
> kqueue(2) or not.  Does anyone know this?

I would expect the other BSDs to pick up kqueue before they pick up ACPI 
support.

> If kqueue is (or become) common BSD API, it would be a good choice.
> If not, we'd better to use traditional API and have dedicated control
> file(s) as mentioned.

Even with a traditional API, multiplexing ACPI events onto a single 
control file is the only sensible way to do this.  It would even be 
trivial to emulate ACPI's use of kqueue using this technique on 
non-kqueue systems.

In case it's not obvious, I am *very* strongly opposed to having anything 
more than a single ACPI control device in /dev.  I would really prefer, 
in fact, to have a more generalised power-management interface, but I 
don't think that we have enough experience yet to decide how it should be 
done.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E


