diff options
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/swap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 2dc883d361d5..9ab989572164 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c | |||
@@ -522,12 +522,15 @@ static int load_image(struct swap_map_handle *handle, | |||
522 | unsigned int m; | 522 | unsigned int m; |
523 | int ret; | 523 | int ret; |
524 | int error = 0; | 524 | int error = 0; |
525 | struct timeval start; | ||
526 | struct timeval stop; | ||
525 | 527 | ||
526 | printk("Loading image data pages (%u pages) ... ", nr_pages); | 528 | printk("Loading image data pages (%u pages) ... ", nr_pages); |
527 | m = nr_pages / 100; | 529 | m = nr_pages / 100; |
528 | if (!m) | 530 | if (!m) |
529 | m = 1; | 531 | m = 1; |
530 | nr_pages = 0; | 532 | nr_pages = 0; |
533 | do_gettimeofday(&start); | ||
531 | do { | 534 | do { |
532 | ret = snapshot_write_next(snapshot, PAGE_SIZE); | 535 | ret = snapshot_write_next(snapshot, PAGE_SIZE); |
533 | if (ret > 0) { | 536 | if (ret > 0) { |
@@ -539,11 +542,13 @@ static int load_image(struct swap_map_handle *handle, | |||
539 | nr_pages++; | 542 | nr_pages++; |
540 | } | 543 | } |
541 | } while (ret > 0); | 544 | } while (ret > 0); |
545 | do_gettimeofday(&stop); | ||
542 | if (!error) { | 546 | if (!error) { |
543 | printk("\b\b\b\bdone\n"); | 547 | printk("\b\b\b\bdone\n"); |
544 | if (!snapshot_image_loaded(snapshot)) | 548 | if (!snapshot_image_loaded(snapshot)) |
545 | error = -ENODATA; | 549 | error = -ENODATA; |
546 | } | 550 | } |
551 | show_speed(&start, &stop, nr_pages, "Read"); | ||
547 | return error; | 552 | return error; |
548 | } | 553 | } |
549 | 554 | ||