From: Martin Steigerwald <Martin@lichtvoll.de>
To: linux-pm@lists.linux-foundation.org
Cc: Nigel Cunningham <nigel@tuxonice.net>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
LKML <linux-kernel@vger.kernel.org>,
"TuxOnIce-devel" <tuxonice-devel@tuxonice.net>
Subject: Re: [linux-pm] [PATCH] Hibernate: Implement readahead when resuming
Date: Sat, 25 Sep 2010 21:02:41 +0200 [thread overview]
Message-ID: <201009252102.52401.Martin@lichtvoll.de> (raw)
In-Reply-To: <1285416056-9735-2-git-send-email-nigel@tuxonice.net>
[-- Attachment #1: Type: Text/Plain, Size: 4288 bytes --]
Hi Nigel and Rafael,
Am Samstag 25 September 2010 schrieb Nigel Cunningham:
> Add support for submitting reads before they're needed. This greatly
> improves the speed of resuming:
>
> From
>
> PM: Image read at 66 MB/s.
>
> to
>
> PM: Image read at 229 MB/s.
>
> ...and removes the need for the sync_read flag.
So
martin@shambhala:~/Computer/Shambhala/Kernel/2.6.36/tuxonice-head> git
branch -av | grep for-rafael
* for-rafael d4e7490 Hibernate: Implement readahead
when resuming
remotes/origin/for-rafael d4e7490 Hibernate: Implement readahead
when resuming
martin@shambhala:~> cat /proc/version
Linux version 2.6.36-rc5-tp42-hibernate-accel-vmembase-0-00135-gd4e7490-
dirty (martin@shambhala) (gcc version 4.4.5 20100728 (prerelease) (Debian
4.4.4-8) ) #1 PREEMPT Sat Sep 25 18:02:02 CEST 2010
basically seems to work.
But
> Signed-off-by: Nigel Cunningham <nigel@tuxonice.net>
> ---
> kernel/power/block_io.c | 97
> ++++++++++++++++++++++++++++++++++++++++++++--- kernel/power/power.h
> | 4 --
> kernel/power/snapshot.c | 5 --
> kernel/power/swap.c | 2 -
> 4 files changed, 91 insertions(+), 17 deletions(-)
>
> diff --git a/kernel/power/block_io.c b/kernel/power/block_io.c
> index fc2e05d..5a13f80 100644
> --- a/kernel/power/block_io.c
> +++ b/kernel/power/block_io.c
[...]
> + if (!offset) {
> + printk("Offset zero - no more readahead.\n");
> + more_readahead = 0;
> + return 0;
> + }
> +
> + printk("(1) Submitting readahead of sector %llu to page %p.\n",
> + offset, ra_page);
and
> + if (!readahead_list_head) {
> + printk("No readahead left. Returning -EFAULT.\n");
> return -EFAULT;
> - return hib_bio_read_page(offset, buf, sync);
> + }
> +
> + printk("Waiting on readahead of page %p.\n", readahead_list_head);
should be made optional - activatable via a debug switch - before this
gets merged, cause it displays a lots of these on resuming which takes
some time in itself.
I tried 5 times:
- one with just kdm started worked nicely and really rather fast!
- four with a full blown KDE 4.5.1 session with OpenGL compositing
- one seemed to hang prior to reinitializing the Radeon KMS DRM setup
- three other worked just fine
I do not think that the hang is related to your changes, Nigel. The kernel
remained stuck at the lower initial resolution and didn't seem to
initialize the radeon KMS framebuffers at 1400x1050 properly. I didn't see
this with 2.6.35 and userspace software suspend.
Writing and reading seems to be way faster than with userspace software
suspend, I didn't compare with unpatched in kernel suspend. But I do not
seem to get any numbers printed:
shambhala:~> grep "Image read" /var/log/syslog
shambhala:~#1> dmesg | grep "Image read"
shambhala:~#1> dmesg | grep "Image writ"
shambhala:~#1> grep "Image writ" /var/log/syslog
shambhala:~#1>
The machine seems to return more quickly to an usable state. Does in
kernel suspend save larger images? I am especially surprised as I use
compression with userspace software suspend which I thought should speed
up writing the image. It feels that in kernel suspend with patches from
you, Nigel, seems to outdo userspace software suspend by quite some
margin.
I have a quite high setting for userspace software suspend image size:
1 # /etc/uswsusp.conf(8) -- Configuration file for s2disk/s2both·
2 resume device = /dev/sda2
3 compress = y
4 early writeout = y
5 image size = 1500
6 shutdown method = halt
Still the machine crawls on resume for about 30 seconds or a minute before
coming into a usable state. With patched in kernel suspend this wait for
responsivity seems to have cut down to about 10-15 seconds.
Please note: I didn't actually measure anything of this, this is just
subjective impressions so far. Before measuring, I think I should disable
those debug outputs I mentioned above ;).
The ThinkPad T42 I am testing on has 2 GiB RAM. Swap is about 4 GB.
No long term observations so far. I will report how it goes.
Thanks,
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-09-25 19:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-25 12:00 Nigel's current for-rafael queue - one more patch Nigel Cunningham
2010-09-25 12:00 ` [PATCH] Hibernate: Implement readahead when resuming Nigel Cunningham
2010-09-25 19:02 ` Martin Steigerwald [this message]
2010-09-25 19:58 ` [linux-pm] " Martin Steigerwald
2010-09-25 20:37 ` with init=/bin/systemd USB/eSATA external mass storage no longer works (was: Re: [linux-pm] [PATCH] Hibernate: Implement readahead when resuming) Martin Steigerwald
2010-09-25 21:24 ` [TuxOnIce-devel] [linux-pm] [PATCH] Hibernate: Implement readahead when resuming Nigel Cunningham
2010-09-25 22:10 ` Martin Steigerwald
2010-09-25 22:37 ` Nigel Cunningham
2010-09-28 8:06 ` Martin Steigerwald
2010-09-28 9:56 ` Martin Steigerwald
2010-09-28 11:09 ` [linux-pm] [TuxOnIce-devel] " Bojan Smojver
2010-09-25 21:18 ` [linux-pm] " Nigel Cunningham
2010-10-04 17:58 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201009252102.52401.Martin@lichtvoll.de \
--to=martin@lichtvoll.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=nigel@tuxonice.net \
--cc=rjw@sisk.pl \
--cc=tuxonice-devel@tuxonice.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox