1
0
Fork 0
alistair23-linux/arch/x86
Venkatesh Pallipadi 335ef896d4 x86, pat: Add rbtree to do quick lookup in memtype tracking
PAT memtype tracking uses a linear link list to keep track of IO
(non-RAM) regions and their memtypes. The code used a last_accessed
pointer as a cache to speedup the lookup. As per discussions with
H. Peter Anvin a while back, having a rbtree here will avoid bad
performances in pathological cases where we may end up with huge
linked list. This may not add any noticable performance speedup
in normal case as the number of entires in PAT memtype list tend
to be ~20-30 range. The patch removes the "cached_entry" logic
as with rbtree we have more generic way of speeding up the lookup.

With this patch, we use rbtree to do the quick lookup. We still use
linked list as the memtype range tracked can be of different sizes
and can overlap in different ways. We also keep track of usage counts
with linked list.

Example:
Multiple ioremaps with different sizes
uncached-minus @ 0xfffff00000-0xfffff04000
uncached-minus @ 0xfffff02000-0xfffff03000

And one userlevel mmap and the thread forks a new process
uncached-minus @ 0xbf453000-0xbf454000
uncached-minus @ 0xbf453000-0xbf454000

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-08-26 15:41:19 -07:00
..
boot Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-20 10:49:48 -07:00
configs Merge branch 'x86-kbuild-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-10 15:30:41 -07:00
crypto crypto: aes-ni - Remove CRYPTO_TFM_REQ_MAY_SLEEP from fpu template 2009-06-18 19:44:01 +08:00
ia32 Merge branch 'core/signal' into perfcounters/core 2009-04-30 21:16:49 +02:00
include/asm x86, pat: Add PAT reserve free to io_mapping* APIs 2009-08-26 15:41:16 -07:00
kernel x86, mtrr: make mtrr_aps_delayed_init static bool 2009-08-21 17:00:02 -07:00
kvm x86: Use printk_once() 2009-08-09 22:28:34 +02:00
lguest lguest: PAE support 2009-06-12 22:27:08 +09:30
lib x86, delay: tsc based udelay should have rdtsc_barrier 2009-06-25 16:47:40 -07:00
math-emu Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
mm x86, pat: Add rbtree to do quick lookup in memtype tracking 2009-08-26 15:41:19 -07:00
oprofile Merge branch 'linus' into perfcounters/core 2009-06-11 17:55:42 +02:00
pci Revert "PCI: use ACPI _CRS data by default" 2009-06-24 16:23:03 -07:00
power x86, pat/mtrr: Rendezvous all the cpus for MTRR/PAT init 2009-08-21 16:25:55 -07:00
vdso gcov: enable GCOV_PROFILE_ALL for x86_64 2009-06-18 13:03:58 -07:00
video
xen Merge branch 'x86-xen-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-10 16:16:27 -07:00
Kbuild x86: standardize Kbuild rules 2009-04-16 18:09:02 +02:00
Kconfig intel-iommu: Clean up identity mapping code, remove CONFIG_DMAR_GFX_WA 2009-06-29 12:37:44 +01:00
Kconfig.cpu Revert "x86, bts: reenable ptrace branch trace support" 2009-06-11 00:32:00 +02:00
Kconfig.debug kmemcheck: make kconfig accessible for other architectures 2009-06-15 15:49:17 +02:00
Makefile kmemcheck: add the kmemcheck core 2009-06-13 15:37:30 +02:00
Makefile_32.cpu