Your message dated Thu, 30 Apr 2009 08:14:25 +0200
with message-id <[email protected]>
and subject line Re: Bug#526242: pm-utils: don't install 90clock, it slows down 
suspend for no reason
has caused the Debian Bug report #526242,
regarding pm-utils: don't install 90clock, it slows down suspend for no reason
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
526242: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526242
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: pm-utils
Version: 1.2.5-2
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch karmic

Hi Michael,

pm-utils currently includes a script to call hwclock on suspend and resume,
to save and restore the system clock.  However, recent kernels handle this
directly, and much more efficiently - having to call hwclock results in a
full one-second delay on suspend and resume, because of the way this
userspace tool works.  So I strongly recommend not installing this script as
part of the package.

(N.B., I only know for sure that this is true for the kernel suspend/resume
method, I can't speak for whether the tuxonice or uswsusp methods do their
own correct clock handling.  Nevertheless, adding a full second delay to the
suspend process significantly impacts the user experience, so if those
methods don't already handle the clock in kernel, they should be fixed to do
so.)

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[email protected]                                     [email protected]
diff -Nru pm-utils-1.2.5/debian/rules pm-utils-1.2.5/debian/rules
--- pm-utils-1.2.5/debian/rules	2009-04-30 04:25:12.000000000 +0000
+++ pm-utils-1.2.5/debian/rules	2009-04-30 04:25:12.000000000 +0000
@@ -22,6 +22,7 @@
 	rm -f debian/pm-utils/usr/share/man/man1/on_ac_power.1
 	# Remove tools/hooks that are not suitable for Debian.
 	rm -f debian/pm-utils/usr/lib/pm-utils/sleep.d/01grub
+	rm -f debian/pm-utils/usr/lib/pm-utils/sleep.d/90clock
 	rm -f debian/pm-utils/usr/lib/pm-utils/bin/pm-reset-swap
 	rm -f debian/pm-utils/usr/lib/pm-utils/bin/pm-pmu
 	rm -f debian/pm-utils/usr/share/man/man8/pm-pmu.8

--- End Message ---
--- Begin Message ---
Steve Langasek wrote:
> On Thu, Apr 30, 2009 at 06:40:12AM +0200, Michael Biebl wrote:
>> Am 30.04.2009 06:28, schrieb Steve Langasek:
>>> Package: pm-utils
>>> Version: 1.2.5-2
>>> Tags: patch
>>> User: [email protected]
>>> Usertags: origin-ubuntu ubuntu-patch karmic
> 
>>> pm-utils currently includes a script to call hwclock on suspend and resume,
>>> to save and restore the system clock.  However, recent kernels handle this
>>> directly, and much more efficiently - having to call hwclock results in a
>>> full one-second delay on suspend and resume, because of the way this
>>> userspace tool works.  So I strongly recommend not installing this script as
>>> part of the package.
> 
>> Well, the script is installed by default, but NEED_CLOCK_SYNC is off in  
>> the default installation, so it is not run.
>> We kept the script for users of older kernels and left the option to  
>> manually enable it.
> 
>> Would that satisfy your needs or is your point that the scripts should  
>> be removed altogether, so it can't be enabled mistakenly?
> 
> Hmm - this surprises me, because as of 1.2.2.4 when this issue was looked at
> in the jaunty cycle (early February), multiple people were able to confirm
> that removing this script had a noticeable impact on suspend/resume speed.
> But I do certainly see the "$NEED_CLOCK_SYNC" check there, and see that it
> was also present in 1.2.2.4, so I'm at a loss to explain why removing this
> script made a difference.
> 
> I think it would probably be better to remove the script altogether (it
> should not be needed on systems going forward, and there is some cost to
> having to start up another shell for this no-op script), but if you/upstream
> disagree, then feel free to close this report.

I'd like to keep this script for now and just follow what is decided upstream.
Just removing it while the man pages / documentation still refer to it, might be
surprising for our users. It also doesn't really have that much of an effect:

# export PM_FUNCTIONS=/usr/lib/pm-utils/pm-functions
# time /usr/lib/pm-utils/sleep.d/90clock

real    0m0.062s
user    0m0.003s
sys     0m0.007s

(this is on my 5 year old laptop)

> In any event, the script does have an inaccurate comment at the top:
> 
>   # TODO: Do modern kernels handle this correctly?  If so, we should detect 
> that
>   #       and skip this hook.
> 
> We know the answer, so perhaps this should be cleaned up at some point. :)

Thanks for the catch, I'll get this comment fixed upstream.

Cheers,
Michael



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

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to