From: "Rafael J. Wysocki" On Monday 14 August 2006 00:04, Andrew Morton wrote: > On Thu, 10 Aug 2006 15:23:41 +0200 > "Rafael J. Wysocki" wrote: > > > Make swsusp use memory bitmaps to store its internal information during the > > resume phase of the suspend-resume cycle. > > This patch makes the resume-time disk IO go all slow again. > > Time to read 80k pages: > > 2.6.18-rc4: 24 seconds > 2.6.18-rc4+akpm-speedups: 10 seconds > 2.6.18-rc4+akpm-speedups+this-patch: 24 seconds Well, I removed one line too many, sorry. Cc: Pavel Machek Signed-off-by: Andrew Morton --- kernel/power/snapshot.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN kernel/power/snapshot.c~swsusp-use-memory-bitmaps-during-resume-fix kernel/power/snapshot.c --- a/kernel/power/snapshot.c~swsusp-use-memory-bitmaps-during-resume-fix +++ a/kernel/power/snapshot.c @@ -1278,13 +1278,14 @@ int snapshot_write_next(struct snapshot_ chain_init(&ca, GFP_ATOMIC, PG_SAFE); memory_bm_position_reset(&orig_bm); restore_pblist = NULL; - handle->sync_read = 0; handle->buffer = get_buffer(&orig_bm, &ca); + handle->sync_read = 0; if (!handle->buffer) return -ENOMEM; } } else { handle->buffer = get_buffer(&orig_bm, &ca); + handle->sync_read = 0; } handle->prev = handle->cur; } _