linux/arch
Roland Dreier 6973cb3740 x86, ioremap: Speed up check for RAM pages
commit c81c8a1eee upstream.

In __ioremap_caller() (the guts of ioremap), we loop over the range of
pfns being remapped and checks each one individually with page_is_ram().
For large ioremaps, this can be very slow.  For example, we have a
device with a 256 GiB PCI BAR, and ioremapping this BAR can take 20+
seconds -- sometimes long enough to trigger the soft lockup detector!

Internally, page_is_ram() calls walk_system_ram_range() on a single
page.  Instead, we can make a single call to walk_system_ram_range()
from __ioremap_caller(), and do our further checks only for any RAM
pages that we find.  For the common case of MMIO, this saves an enormous
amount of work, since the range being ioremapped doesn't intersect
system RAM at all.

With this change, ioremap on our 256 GiB BAR takes less than 1 second.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Link: http://lkml.kernel.org/r/1399054721-1331-1-git-send-email-roland@kernel.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 16:21:06 -07:00
..
alpha alpha: fix broken network checksum 2014-01-31 09:21:55 -08:00
arc ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safe 2014-05-13 13:32:50 +02:00
arm ARM: OMAP2+: Fix parser-bug in platform muxing code 2014-07-09 11:18:27 -07:00
arm64 arm64: implement TASK_SIZE_OF 2014-07-17 16:21:04 -07:00
avr32 avr32: add generic vga.h to Kbuild 2014-02-17 11:24:48 +01:00
blackfin Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2014-01-31 09:31:14 -08:00
c6x Build fix for c6x 2014-03-07 09:52:46 -08:00
cris cris: convert ffs from an object-like macro to a function-like macro 2014-03-10 17:26:21 -07:00
frv Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-01-30 16:58:05 -08:00
hexagon
ia64 hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-30 20:11:53 -07:00
m32r
m68k m68k: Skip futex_atomic_cmpxchg_inatomic() test 2014-04-14 06:50:05 -07:00
metag parisc,metag: Do not hardcode maximum userspace stack size 2014-07-17 16:21:03 -07:00
microblaze microblaze: Fix a typo when disabling stack protection 2014-02-10 07:44:11 +01:00
mips MIPS: KVM: Fix memory leak on VCPU 2014-07-06 18:57:29 -07:00
mn10300 Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-01-30 16:58:05 -08:00
openrisc OpenRISC updates for 3.14 2014-01-30 17:08:41 -08:00
parisc parisc,metag: Do not hardcode maximum userspace stack size 2014-07-17 16:21:03 -07:00
powerpc powerpc: Disable RELOCATABLE for COMPILE_TEST with PPC64 2014-07-17 16:21:06 -07:00
s390 s390/lowcore: reserve 96 bytes for IRB in lowcore 2014-06-30 20:11:55 -07:00
score Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2014-01-31 09:31:14 -08:00
sh hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-30 20:11:53 -07:00
sparc hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-30 20:11:53 -07:00
tile hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-30 20:11:53 -07:00
um
unicore32 arch/unicore32/mm/alignment.c: include "asm/pgtable.h" to avoid compiling error 2014-07-09 11:18:29 -07:00
x86 x86, ioremap: Speed up check for RAM pages 2014-07-17 16:21:06 -07:00
xtensa Xtensa fixes for 3.14: 2014-02-24 00:34:36 -08:00
.gitignore
Kconfig