On Fri, Jan 25, 2008 at 01:24:51PM -0800, David Bustos wrote: > Quoth Nicolas Williams on Fri, Jan 25, 2008 at 01:28:27PM -0600: > > Receiving an event from the authoritative source about when the network > > has been re-configured would be better. That would be NWAM, but if NWAM > > is leveraging SMF then it might be SMF. > > I think you're asking for a way to tell when networking behavior matches > the administrator's intended behavior. That sounds reasonable, but > something for the networking team(s) to discuss. If the networking > team(s) wish to utilize an SMF event channel for that, then that might > also be reasonable, but I'd like to see a more detailed list of > required semantics, since SMF wasn't explicitly designed for that (as > far as I can tell).
I gave a specific example, but I think that a non-polling way to learn about SMF service state changes is important. I think that because in general non-polling interfaces by which to discover various system state changes are useful. > > Is that because underneath _scf_notify_wait() makes a door call that > > blocks in the daemon, thus using a whole thread per-waiter for long > > periods of time? Yes, a more space-efficient method of event reporting > > would be better (e.g., the callers pass a door to the daemon to get > > called back on, or maybe just a pipe, or, if event ports can be passed > > around, then an event port, ...). > > No, it's because nwamd would know the details of how the SMF tools > communicate with svc.startd through the repository. I'd rather have > nwamd listen through the interface designed for this, the restarter > interface. I don't see why a neatly packaged interface for asking restarters (or svc.configd) for state information would be the same thing as exposing implementation details. Also, I think that limiting event consumers to restarters, and further limiting them to learn only about the state of their spawn, is just too... limiting. Why constrain these interfaces so? Or did you mean something else? I'm not arguing for making _scf_notify_wait() and friends public, btw, but for an "interface designed for this" that does not require that the event consumer be a restarter. Nico --