[PATCH] Use progress bar also for bitmap creation

Bernhard Walle bwalle at suse.de
Tue Jul 8 11:43:54 EDT 2008


* Ken'ichi Ohmichi [2008-07-07 11:50]:
> Ken'ichi Ohmichi wrote:
> > Hi Bernhard,
> > 
> > Thank you for your patch.
> > I like this idea :-)
> > 
> > I am busy now, and I will consider the patch well the next week.
> 
> Thank you for the patch, and sorry for my late response.
> 
> I added the progress bar for excluding free pages to your patch.
> Could you please check the attached patch ?
> If there is no problem in the attached patch, I will release the
> next release with this patch.

I also tested on a larger SGI machine. Here the exclusion of the memory
holes takes a considerable amount of time. Therefore, I would suggest
to also use the patch below:


Signed-off-by: Bernhard Walle <bwalle at suse.de>

Index: makedumpfile.c
===================================================================
RCS file: /cvsroot/makedumpfile/makedumpfile/makedumpfile.c,v
retrieving revision 1.7.2.36
diff -u -r1.7.2.36 makedumpfile.c
--- makedumpfile.c	8 Jul 2008 01:31:44 -0000	1.7.2.36
+++ makedumpfile.c	8 Jul 2008 15:41:18 -0000
@@ -40,6 +40,7 @@
  * Message texts
  */
 #define PROGRESS_COPY   	"Copying data"
+#define PROGRESS_HOLES		"Checking for memory holes"
 #define PROGRESS_UNN_PAGES 	"Excluding unnecessary pages"
 #define PROGRESS_FREE_PAGES 	"Excluding free pages"
 #define PROGRESS_ZERO_PAGES 	"Excluding zero pages"
@@ -4068,11 +4069,20 @@
 	 */
 	for (pfn = 0, paddr = 0; pfn < info->max_mapnr;
 	    pfn++, paddr += info->page_size) {
+
+		print_progress(PROGRESS_HOLES, pfn, info->max_mapnr);
+
 		if (is_in_segs(paddr))
 			set_bit_on_1st_bitmap(pfn);
 		else
 			pfn_memhole++;
 	}
+
+	/*
+	 * print 100 %
+	 */
+	print_progress(PROGRESS_HOLES, info->max_mapnr, info->max_mapnr);
+
 	if (!sync_1st_bitmap())
 		goto out;
 



More information about the kexec mailing list