[Pm-utils] [patch commit] [011] POSIXification of pm-utils

Victor Lowther victor.lowther at gmail.com
Sun Jan 27 19:18:51 PST 2008


On Jan 27, 2008 9:04 PM, Michael Biebl <mbiebl at gmail.com> wrote:
> 2008/1/28, Victor Lowther <victor.lowther at gmail.com>:
>
> > > And to change the default governor during suspend/hibernate, I'd say
> > > you have to use
> > >
> > > --- a/pm/functions
> > > +++ b/pm/functions
> > > @@ -15,7 +15,7 @@ HIBERNATE_RESUME_POST_VIDEO=no
> > >  INHIBIT=/var/run/pm-utils.inhibit
> > >  PM_LOGFILE=${PM_LOGFILE:=/var/log/pm-suspend.log}
> > >  SUSPEND_MODULES=""
> > > -TEMPORARY_CPUFREQ_GOVERNOR="userspace"
> > > +TEMPORARY_CPUFREQ_GOVERNOR="performance"
> > >
> > >  # Use c sort order
> > >  export LC_COLLATE=C
> > >
> > > || gov="performance" is only a fallback.
> >
> > Precisely.  The code I have is by design -- performance is the
> > fallback governor.  The commit comment is incorrect in this case. :)
>
> Hm, but I'd say performance shouldn't be the fallback but the default.
> I mean, we want to hibernate/suspend as quickly as possible, right?
> Why should we use userspace then as TEMPORARY_CPUFREQ_GOVERNOR ?

The change was for correctness (performance is compiled in on a
vanilla kernel build, the others are not), not speed. If you are
looking for raw suspend/resume speed, minimize IO. The biggest wins I
have gotten happened by:

Not touching the hardware clock at all during suspend/resume.
Eliminating everything that messes with the video card (I use the
nvidia binary drivers, and POSTing the card/anything to do with
VBE/multiple console swtiches are all unneeded with my system)
Precaching all the binaries and scripts used by power management
before a suspend/resume cycle (just cat everything involved to
/dev/null).
Eliminating as many forked programs as I could (sourcing scripts
instead of running them, etc.)
Using dash instead of bash.

All that was while experimenting with the old acpi-support framework
that Feisty used.

The only reason I changed the fall back to performance is that on a
vanilla kernel with cpufreq enabled it is compiled in, and the others
are not even selected -- CPU speed is not the limiting factor.

> Cheers,
> Michael
>
> --
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?
>


More information about the Pm-utils mailing list