public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: x86@kernel.org, linux-kernel@vger.kernel.org
Cc: venkatesh.pallipadi@intel.com, stable@kernel.org
Subject: [PATCH] x86: Use ioremap_cache() for crash dump copies
Date: Fri, 2 Oct 2009 05:35:08 +0200	[thread overview]
Message-ID: <20091002033508.GA8436@basil.fritz.box> (raw)

During code review I noticed that when reading the previous kernel
memory from a kdump kernel ioremap() is used. This was ok before
the PAT changes, but with PAT ioremap() this results in an uncached
mapping, which is very slow.

Change it to ioremap_cache(). This is fine because this code
only reads real memory, no IO mappings.

I haven't run numbers, but I suspect this will speed up crash dumping
somewhat.

Only affects 64bit, 32bit uses a different method.

Might be a stable candidate.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/kernel/crash_dump_64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/crash_dump_64.c b/arch/x86/kernel/crash_dump_64.c
index 045b36c..bf43188 100644
--- a/arch/x86/kernel/crash_dump_64.c
+++ b/arch/x86/kernel/crash_dump_64.c
@@ -34,7 +34,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
 	if (!csize)
 		return 0;
 
-	vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE);
+	vaddr = ioremap_cache(pfn << PAGE_SHIFT, PAGE_SIZE);
 	if (!vaddr)
 		return -ENOMEM;
 
-- 
1.6.0.2


-- 
ak@linux.intel.com -- Speaking for myself only.

                 reply	other threads:[~2009-10-02  3:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20091002033508.GA8436@basil.fritz.box \
    --to=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=venkatesh.pallipadi@intel.com \
    --cc=x86@kernel.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