On Tuesday, 26 September 2006 12:04, Stefan Seyfried wrote:
> On Mon, Sep 25, 2006 at 09:11:49PM +0200, Rafael J. Wysocki wrote:
> > On Monday, 25 September 2006 09:42, Stefan Seyfried wrote:
> 
> > > It is a PITA since i have to (for example), in order to port the "retry
> > > suspend with smaller image if we were 'out of swap' in the first round"
> > > or the "if there is only 300mb swap free, it does not make sense to 
> > > request
> > > a 350mb image, so in this case only request 270mb" features from in-kernel
> > > to uswsusp, write the config file dynamically with my calculated "best"
> > > image size.
> > 
> > First, s2disk will automatically set image_size to 0 if it cannot suspend 
> > with
> > the user-provided one. :-)
> 
> Yes, i figured this out yesterday evening, too when i prepared the
> pmops-stuff :-) I really should have started reading the uswsusp-code
> sooner :-)
>  
> > Second, you have given a very specific example.  Generally the settings 
> > don't
> > change between subsequent invocations of s2disk, so the need to stay in a
> > config file, and it really doesn't matter in which one.
> 
> You may be right here.
> 
> > > Also, i taught my users to use "resume=" kernel parameter and they took
> > > a long time to learn this, so i will use "resume=" in the future, and 
> > > since
> > > i cannot give it on the command line (only for resume, not for s2disk), i
> > > will need to write the config file dynamically with this info. This also
> > > makes the update case easier. (the latest SUSE mkinitrd is already just
> > > using resume= for resuming and not adding the config file to the initrd
> > > at all)
> > > 
> > > Oops. I just checked the code. Apparently i can give s2disk the device
> > > also on the command line. But anyway, still applies at least for the image
> > > size.
> > 
> > I think we can add command line options for the parameters that can be set 
> > via
> > sysfs or the kernel command line when the in-kernel swsusp is used.
> 
> I looked into just letting the command line being parsed like the config file,
> so that we could do
> 
>    s2ram /dev/hda5 'compress = y' 'image size = 333333333'
> 
> and let the command line override the config file settings.
> Should not be too hard, but also not too high prioritized :-)

For this purpose we can teach the parser to accept names in which 
spaces are replaced with underbars.  Shouldn't too be difficult.

> Right now, i will probably (for openSUSE 10.2) autogenerate the config
> file from the "template" in /etc/suspend.conf, which means: if the user
> sets something explicitly in suspend.conf, then he will get his setting.
> If he doesn't, powersaved scripts will choose a good default for him. The
> resume device will always be taken from the "resume=" kernel command line
> option, since that is what the initrd will use anyway.
> I will put this in a README.SUSE and into comments in /etc/suspend.conf
> in my suspend package, so i hope the confusion among the users will not
> be bigger than necessary

I hope so too. :-)  Sounds reasonable.

Greetings,
Rafael


-- 
You never change things by fighting the existing reality.
                R. Buckminster Fuller

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Suspend-devel mailing list
Suspend-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to