[evlog-dev] Re: alternate event logging proposal
Tim Hockin <[email protected]> Tue, 24 Sep 2002 16:38:54 -0700
| Newsgroups | gmane.linux.kernel.event-logging,gmane.linux.kernel,gmane.linux.kernel.carrier-grade |
|---|---|
| Message-ID | <[email protected]> |
Jeff Garzik wrote: > Brad Hards wrote: > >> I liked the /sbin/hotplug arrangement (aka call_usermode_helper). In >> fact, my plan was to add the call_usermode_helper call to the >> netif_carrier_[on,off] functions. Unfortuantely, I've been to too many >> of Rusty's talks, and know that calling a function that is only safe >> in user context is unlikely to be a good idea in >> netif_carrier_[on,off], which are more than likely running in >> interrupt context. > > > > You really want something where a userspace app can sleep on an fd, to > be awakened when link changes (or some other interesting event occurs) I tend to agree - I like either of the models: a bunch of little single-value files that can be polled and read or a single device_event file that a daemon reads and dispatches events (I like this one because the daemon is already written, just poorly named - acpid) For things like netif_carrier, poll() is probably best - the DHCP client can be fully self contained, and not need an eventd to alert it to a signal change. Of course, acpid does support UNIX socket connections from apps like DHCP.... -- Tim Hockin Systems Software Engineer Sun Microsystems, Linux Kernel Engineering [email protected] ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf