diff options
author | Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 2009-07-10 09:57:36 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-08-26 15:41:19 -0700 |
commit | 335ef896d4c6639849d79367f0fef9abc06d121b (patch) | |
tree | 6567e3c9512a7c8bd31a324783d8c427baf2145d /arch/x86/Kconfig | |
parent | 9e36fda0b359d2a6ae039c3d7e71a04502a77898 (diff) | |
download | lwn-335ef896d4c6639849d79367f0fef9abc06d121b.tar.gz lwn-335ef896d4c6639849d79367f0fef9abc06d121b.zip |
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>
Diffstat (limited to 'arch/x86/Kconfig')
0 files changed, 0 insertions, 0 deletions