Re: Which is simpler? (Was Re: [Suspend2-devel] Re: [ 00/10] [Suspend2] Modules support.)

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

 



Hi again.

On Wednesday 08 February 2006 09:05, Pavel Machek wrote:
> Hi!
> 
> > > > # cat /sys/power/disk_method
> > > > swsusp uswsusp suspend2
> > > > # echo uswsusp > /sys/power/disk_method
> > > > # echo > /sys/power/state
> > > > 
> > > > Is there a big problem with that, which I've missed?
> > > 
> > > Userland suspend is driven by the suspending application which only 
calls
> > > the kernel to do things it cannot do itself, like freezing (the 
other)
> > > processes, snapshotting the system etc.  We use the /dev/snapshot
> > > device and the ioctl()s in there, so no sysfs files are needed for 
that.
> > > It's independent and can coexist with the existing sysfs interface
> > > just fine.
> > 
> > Yes, but how are you going to get it started from (say) klaptop, which 
only 
> > knows "echo disk > /sys/power/state" as the way of starting a suspend? 
I'm 
> > suggesting that we create a means whereby the issue of how to start a 
> > cycle could be separated from what implementation is used to do the 
work. 
> > That is, a simple extension at the start of the disk specific code that 
> > starts swsusp, uswsusp or suspend2 depending upon what you want. Maybe 
I 
> > should just prepare a patch.
> 
> Please do not patch kernel for that.
> 
> Proper solution is probably creating s2disk program/script, and teach
> kpowersave/klaptop/etc. to just use it. Then s2disk can detect best
> method to use ... and then just do it. You already have suitable
> script, but I'm not sure what its name is.

It occured to me as soon as I sent the last email (don't you hate that!)
that I'd forgotten the original impetus: backwards compatibility. If all
of the methods of suspending can be started with

"echo disk > /sys/power/state"

, your backwards compatability issue that you expressed concern about 
earlier in this discussion is addressed. So, I'm not sure that dropping the
idea is the right thing to do.

Regards,

Nigel

-- 
See our web page for Howtos, FAQs, the Wiki and mailing list info.
http://www.suspend2.net                IRC: #suspend2 on Freenode

Attachment: pgp3vEgG0WfVG.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux