diff options
author | Bojan Smojver <bojan@rexursive.com> | 2011-10-13 17:58:07 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-10-16 17:30:38 -0400 |
commit | 081a9d043c983f161b78fdc4671324d1342b86bc (patch) | |
tree | 4382d88e5705b18a95471af2a71319401c47744f /kernel/power/hibernate.c | |
parent | d231ff1af70a2df43d809173cf8c94e9c3beb853 (diff) |
PM / Hibernate: Improve performance of LZO/plain hibernation, checksum image
Use threads for LZO compression/decompression on hibernate/thaw.
Improve buffering on hibernate/thaw.
Calculate/verify CRC32 of the image pages on hibernate/thaw.
In my testing, this improved write/read speed by a factor of about two.
Signed-off-by: Bojan Smojver <bojan@rexursive.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power/hibernate.c')
-rw-r--r-- | kernel/power/hibernate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index ea12c8f1bdf..1c53f7fad5f 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c | |||
@@ -657,6 +657,9 @@ int hibernate(void) | |||
657 | flags |= SF_PLATFORM_MODE; | 657 | flags |= SF_PLATFORM_MODE; |
658 | if (nocompress) | 658 | if (nocompress) |
659 | flags |= SF_NOCOMPRESS_MODE; | 659 | flags |= SF_NOCOMPRESS_MODE; |
660 | else | ||
661 | flags |= SF_CRC32_MODE; | ||
662 | |||
660 | pr_debug("PM: writing image.\n"); | 663 | pr_debug("PM: writing image.\n"); |
661 | error = swsusp_write(flags); | 664 | error = swsusp_write(flags); |
662 | swsusp_free(); | 665 | swsusp_free(); |