From: Philipp Rudo <prudo@redhat.com>
To: kexec@lists.infradead.org
Subject: [PATCH 2/2] makedumpfile: break loop after last dumpable page
Date: Mon, 4 Apr 2022 17:50:50 +0200 [thread overview]
Message-ID: <20220404155050.6898-3-prudo@redhat.com> (raw)
In-Reply-To: <20220404155050.6898-1-prudo@redhat.com>
Once the last dumpable page was processed there is no need to finish the
loop to the last page. Thus exit early to improve performance.
Signed-off-by: Philipp Rudo <prudo@redhat.com>
---
makedumpfile.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/makedumpfile.c b/makedumpfile.c
index 2ef3458..c944d0e 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -8884,6 +8884,12 @@ write_kdump_pages_cyclic(struct cache_data *cd_header, struct cache_data *cd_pag
for (pfn = start_pfn; pfn < end_pfn; pfn++) {
+ /*
+ * All dumpable pages have been processed. No need to continue.
+ */
+ if (num_dumped == info->num_dumpable)
+ break;
+
/*
* Check the excluded page.
*/
--
2.35.1
next prev parent reply other threads:[~2022-04-04 15:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-04 15:50 [PATCH 0/2] makedumpfile: improve write_kdump_pages_cyclic Philipp Rudo
2022-04-04 15:50 ` [PATCH 1/2] makedumpfile: omit unnecessary calls to print_progress Philipp Rudo
2022-04-07 6:42 ` HAGIO KAZUHITO =?unknown-8bit?b?6JCp5bC+IOS4gOS7gQ==?=
2022-04-04 15:50 ` Philipp Rudo [this message]
2022-04-07 6:43 ` [PATCH 2/2] makedumpfile: break loop after last dumpable page HAGIO KAZUHITO =?unknown-8bit?b?6JCp5bC+IOS4gOS7gQ==?=
2022-04-07 6:51 ` HAGIO KAZUHITO =?unknown-8bit?b?6JCp5bC+IOS4gOS7gQ==?=
2022-04-07 12:50 ` Philipp Rudo
2022-04-08 3:00 ` HAGIO KAZUHITO =?unknown-8bit?b?6JCp5bC+IOS4gOS7gQ==?=
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220404155050.6898-3-prudo@redhat.com \
--to=prudo@redhat.com \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox