makedumpfile utility optimization

Atsushi Kumagai ats-kumagai at wm.jp.nec.com
Thu Apr 14 22:24:31 PDT 2016


(CC'ing kexec-ML)

Hello Hemanth,

>Hi 'makedumpfile' utility developers,
>
>I'm using version 1.5.6 and I see that we can optimize the utility using this patch:
>
>--- makedumpfile-1.5.6/makedumpfile.c   2014-04-20 18:59:18.000000000 -0700
>+++ makedumpfile-1.5.6-changed/makedumpfile.c   2016-04-11 18:47:50.019563738 -0700
>@@ -6475,6 +6475,15 @@
>
>        for (pfn = start_pfn; pfn < end_pfn; pfn++) {
>
>+               /*
>+                * There's no point in checking other pages if we've already dumped
>+                * all the pages that are dumpable
>+                */
>+               if (num_dumped == info->num_dumpable) {
>+                       ret = TRUE;
>+                       goto out;
>+               }
>+
>                if ((num_dumped % per) == 0)
>                        print_progress(PROGRESS_COPY, num_dumped, info->num_dumpable);
>
>Why are we looping even after we are done with all the dumpable pages to start with?
>I'm concerned if I'm missing something with this patch.

You are right, it's better to break the loop after the last dumpable page
is written. I neglected that since the remains of loop just check the
bitmap and call continue, I thought the wasteful processing cost is little.
I'm curious to know how much does this patch improve the performance.


Thanks,
Atsushi Kumagai



More information about the kexec mailing list