x86: Use ioremap_cache() for crash dump copies
PATCH 1/1 x86: Use ioremap_cache() for crash dump copies
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 <[email protected]>
--- arch/x86/kernel/crash_dump_64.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/crash_dump_64.c +1 -1
@@ -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 ;
Signature · 5 lines
1.6.0.2 -- [email protected] -- Speaking for myself only.