mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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>
This commit is contained in:
parent
d231ff1af7
commit
081a9d043c
@ -27,6 +27,7 @@ config HIBERNATION
|
||||
select HIBERNATE_CALLBACKS
|
||||
select LZO_COMPRESS
|
||||
select LZO_DECOMPRESS
|
||||
select CRC32
|
||||
---help---
|
||||
Enable the suspend to disk (STD) functionality, which is usually
|
||||
called "hibernation" in user interfaces. STD checkpoints the
|
||||
|
@ -657,6 +657,9 @@ int hibernate(void)
|
||||
flags |= SF_PLATFORM_MODE;
|
||||
if (nocompress)
|
||||
flags |= SF_NOCOMPRESS_MODE;
|
||||
else
|
||||
flags |= SF_CRC32_MODE;
|
||||
|
||||
pr_debug("PM: writing image.\n");
|
||||
error = swsusp_write(flags);
|
||||
swsusp_free();
|
||||
|
@ -146,6 +146,7 @@ extern int swsusp_swap_in_use(void);
|
||||
*/
|
||||
#define SF_PLATFORM_MODE 1
|
||||
#define SF_NOCOMPRESS_MODE 2
|
||||
#define SF_CRC32_MODE 4
|
||||
|
||||
/* kernel/power/hibernate.c */
|
||||
extern int swsusp_check(void);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user