makedumpfile: fix wrong report time for copying data
Subsystems (2)
PATCH 1/1 makedumpfile: fix wrong report time for copying data
From 81c669484d6e38856f931af025e0d391abcdd168 Mon Sep 17 00:00:00 2001
From: HATAYAMA Daisuke <[email protected]>
Date: Fri, 10 Jan 2014 12:29:03 +0900
Subject: [PATCH] fix wrong report time for copying data
Currently, in cyclic mode, reported time for copying pages includes the time consumed for 1) update cycles, 2) filtering memory, 3) writing pages and 4) other things among the three. This is wrong. The ``copying pages'' should be ``3) writing pages'' only.
On the system with terabyte-scale memory, it requires several minutes to process memory filtering. As a result, on such system, copying data in cyclic mode looks several minutes slower than the actual.
This patch fixes this by counting times for ``3) writing pages'' only as a time for ``copying pages.''
The output changes like below:
[before]
Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.124988 seconds Excluding unnecessary pages : [100.0 %] -STEP [Excluding unnecessary pages] : 0.142915 seconds Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.024244 seconds Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.118873 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.142979 seconds Excluding unnecessary pages : [100.0 %] -STEP [Excluding unnecessary pages] : 0.024361 seconds Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.118428 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.143258 seconds Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.024470 seconds Copying data : [100.0 %] -STEP [Copying data ] : 19.807846 seconds
[after]
Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.118851 seconds Excluding unnecessary pages : [100.0 %] -STEP [Excluding unnecessary pages] : 0.142766 seconds Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.024204 seconds Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.118849 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.142812 seconds Excluding unnecessary pages : [100.0 %] -STEP [Excluding unnecessary pages] : 0.024394 seconds Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.118293 seconds Copying data : [ 25.6 %] |STEP [Copying data ] : 4.343230 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.143136 seconds Copying data : [ 73.4 %] /STEP [Copying data ] : 9.939977 seconds Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.024642 seconds Copying data : [100.0 %] -STEP [Copying data ] : 4.844130 seconds Copying data : [100.0 %] /STEP [Copying data ] : 0.000093 seconds
So, you need to calculate a total time for copying data by yourself.
--- makedumpfile.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
makedumpfile.c +8 -2
@@ -6331,6 +6331,7 @@ write_kdump_pages_cyclic(struct cache_data *cd_header, struct cache_data *cd_pagstruct page_desc pd;unsigned char buf[info->page_size], *buf_out =NULL ;unsigned long len_buf_out; +struct timeval tv_start;const off_t failed = (off_t)-1 ;unsigned long len_buf_out_zlib, len_buf_out_lzo, len_buf_out_snappy;
@@ -6390,6 +6391,8 @@ write_kdump_pages_cyclic(struct cache_data *cd_header, struct cache_data *cd_pag end_pfn = info->split_end_pfn; } +gettimeofday (&tv_start,NULL ); +for (pfn = start_pfn; pfn < end_pfn; pfn++) {if ((num_dumped % per) ==0 )
@@ -6482,6 +6485,9 @@ out:free (wrkmem);#endif +print_progress (PROGRESS_COPY , num_dumped, info->num_dumpable); +print_execution_time (PROGRESS_COPY , &tv_start); +return ret; }
@@ -6816,8 +6822,6 @@ write_kdump_pages_and_bitmap_cyclic(struct cache_data *cd_header, struct cache_dunsigned long long pfn;struct timeval tv_start; -gettimeofday (&tv_start,NULL ); -/* * Reset counter for debug message. */
@@ -6888,6 +6892,8 @@ write_kdump_pages_and_bitmap_cyclic(struct cache_data *cd_header, struct cache_dreturn FALSE; } +gettimeofday (&tv_start,NULL ); +/* * Write the remainder. */
Signature · 11 lines
1.8.4.2 -- Thanks. HATAYAMA, Daisuke _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 10 lines · kexec
From
81c669484d6e38856f931af025e0d391abcdd168Mon Sep 17 00:00:00 2001
From: HATAYAMA Daisuke <[email protected]>
Date: Fri, 10 Jan 2014 12:29:03 +0900
Subject: [PATCH] fix wrong report time for copying dataCurrently, in cyclic mode, reported time for copying pages includes the time consumed for 1) update cycles, 2) filtering memory, 3) writing pages and 4) other things among the three. This is wrong. The ``copying pages'' should be ``3) writing pages'' only.
Quoted 6 lines
On the system with terabyte-scale memory, it requires several minutes to process memory filtering. As a result, on such system, copying data in cyclic mode looks several minutes slower than the actual.
This patch fixes this by counting times for ``3) writing pages'' only as a time for ``copying pages.''
write_elf_pages_cyclic() should be fixed too, but it's difficult to fix it neatly because the ``3) writing pages'' sections are separated in it. So I think I should clean it up before fix the report time issue if possible.
Anyway, I accept this patch as it is, thanks.
Atsushi Kumagai
Quoted 100 lines
The output changes like below:
[before]
Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.124988 seconds Excluding unnecessary pages : [100.0 %] -STEP [Excluding unnecessary pages] : 0.142915 seconds Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.024244 seconds Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.118873 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.142979 seconds Excluding unnecessary pages : [100.0 %] -STEP [Excluding unnecessary pages] : 0.024361 seconds Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.118428 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.143258 seconds Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.024470 seconds Copying data : [100.0 %] -STEP [Copying data ] : 19.807846 seconds[after]
Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.118851 seconds Excluding unnecessary pages : [100.0 %] -STEP [Excluding unnecessary pages] : 0.142766 seconds Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.024204 seconds Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.118849 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.142812 seconds Excluding unnecessary pages : [100.0 %] -STEP [Excluding unnecessary pages] : 0.024394 seconds Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.118293 seconds Copying data : [ 25.6 %] |STEP [Copying data ] : 4.343230 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.143136 seconds Copying data : [ 73.4 %] /STEP [Copying data ] : 9.939977 seconds Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.024642 seconds Copying data : [100.0 %] -STEP [Copying data ] : 4.844130 seconds Copying data : [100.0 %] /STEP [Copying data ] : 0.000093 secondsSo, you need to calculate a total time for copying data by yourself.
Signed-off-by HATAYAMA Daisuke <[email protected]>--- makedumpfile.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)makedumpfile.c +8
-2@@ -6331,6 +6331,7 @@ write_kdump_pages_cyclic(struct cache_data *cd_header, struct cache_data *cd_pagstruct page_desc pd;unsigned char buf[info->page_size], *buf_out =NULL ;unsigned long len_buf_out; +struct timeval tv_start;const off_t failed = (off_t)-1 ;unsigned long len_buf_out_zlib, len_buf_out_lzo, len_buf_out_snappy;@@ -6390,6 +6391,8 @@ write_kdump_pages_cyclic(struct cache_data *cd_header, struct cache_data *cd_pag end_pfn = info->split_end_pfn; } +gettimeofday (&tv_start,NULL ); +for (pfn = start_pfn; pfn < end_pfn; pfn++) {if ((num_dumped % per) ==0 )@@ -6482,6 +6485,9 @@ out:free (wrkmem);#endif +print_progress (PROGRESS_COPY , num_dumped, info->num_dumpable); +print_execution_time (PROGRESS_COPY , &tv_start); +return ret; }@@ -6816,8 +6822,6 @@ write_kdump_pages_and_bitmap_cyclic(struct cache_data *cd_header, struct cache_dunsigned long long pfn;struct timeval tv_start; -gettimeofday (&tv_start,NULL ); -/* * Reset counter for debug message. */ @@ -6888,6 +6892,8 @@ write_kdump_pages_and_bitmap_cyclic(struct cache_data *cd_header, struct cache_dreturn FALSE; } +gettimeofday (&tv_start,NULL ); +/* * Write the remainder. */ Signature · 11 lines
1.8.4.2 -- Thanks. HATAYAMA, Daisuke _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec