[linux-pm] Some thoughts on suspend/resume development

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

On Thu, 2005-03-10 at 09:26, Pavel Machek wrote:
> On ?t 10-03-05 08:49:54, Nigel Cunningham wrote:
> > On Wed, 2005-03-09 at 20:36, Pavel Machek wrote:
> > > Hi!
> > > 
> > > > > > Uh, that would really suck. This would entail a string parser in every
> > > > > > driver, which is what we wanted to get away from with sysfs. A better way
> > > > > > would be to have a driver export a file with the specific features that it
> > > > > > supports encoded in a meaningful and efficient way (i.e. a fixed-length
> > > > > > string, character, or constant).
> > > > > 
> > > > > Agreed.
> > > > 
> > > > <heresy> I wonder if using sysfs is even the best method for doing
> > > > run-time PM. It will force your imaginary nice userspace interface to
> > > > include code to scan the whole directory tree looking for files of each
> > > > kind, perhaps sorting and collating and so on. Maybe a DBus interface
> > > > would be better? </heresy>
> > > 
> > > DBus is too hard to use from shell, and I do not think whole directory
> > > scan is so hard to do.
> > 
> > Perhaps provide both? Of course I don't know what the implications
> 
> No...
> 
> I do not believe sysfs is ever going to be efficiency problem. If your
> machine is so big that your /sys is big, then your machine is fast
> enough to handle it.

It is possible, I agree. But how slow would it be?

I guess the real show stopper would be the fact that you'd need to have
your userspace daemon constantly scanning these sysfs files for events.
That or you'd need to provide one sysfs entry that simplified things by
duplicating all events through one file. If we go that far, it's not
much further to a netlink socket.

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


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux