Hi. On Thu, 2005-03-10 at 10:33, Pavel Machek wrote: > On ?t 10-03-05 10:28:16, Nigel Cunningham wrote: > > On Thu, 2005-03-10 at 10:08, David Zeuthen wrote: > > > > I also think there is some general confusion about using D-BUS in kernel > > > space in this thread - the whole reason for doing the uevents stuff, > > > IIRC, was that they are easy to be picked up by the D-BUS system message > > > bus and pushed out to the rest of user space. IIRC there were never any > > > talk about having user space using D-BUS to invoke methods in the kernel > > > - it was strictly one-way. > > > > That sounds good from the kernel->userspace side, but hideous from the > > other perspective! But perhaps I'm just being ignorant :> Say a > > userspace daemon learns that we've just lost AC and have 3 minutes of > > UPS power left. I guess it would notify HAL, but wouldn't we then want > > HAL to notify kernel space? Or would you imagine HAL directly saying to > > drivers, "Video driver, turn the monitor off if you haven't already."? > > I believe that we want HAL talking to drivers... because otherwise > we'd have to put policy into kernel. Hmm. I agree with having policy in userspace, but the question is, how much. I've been thinking that the _setting_ of policy belongs in userspace, but the _implementation_ of policy belongs in the drivers. If that's the case, then events that affect the implementation of policy - such as this example - would need to be able to come from userspace. I can see sense in your argument, but it also causes me to rethink that distinction. Perhaps the setting of policy belongs in userspace, and the implementation of policy belongs in the drivers in some cases, and in userspace in others. But if we go down that path, don't we complicate matters when it comes to run time power management? Regards, Nigel -- Nigel Cunningham Software Engineer, Canberra, Australia http://www.cyclades.com Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028; Mob: +61 (417) 100 574 Maintainer of Suspend2 Kernel Patches http://suspend2.net