summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2012-05-20 14:33:28 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2012-05-20 14:33:28 +0000
commite83623fb1f368db55beaa73ecfd90d627c524f4b (patch)
tree1d06c575899d7ecca494a390994c1ce387b42f33 /sys/powerpc/include
parent3dd573fa0d4b2ba1119f42fd90b06ac1a0325929 (diff)
downloadFreeBSD-src-e83623fb1f368db55beaa73ecfd90d627c524f4b.zip
FreeBSD-src-e83623fb1f368db55beaa73ecfd90d627c524f4b.tar.gz
Replace the list of PVOs owned by each PMAP with an RB tree. This simplifies
range operations like pmap_remove() and pmap_protect() as well as allowing simple operations like pmap_extract() not to involve any global state. This substantially reduces lock coverages for the global table lock and improves concurrency.
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r--sys/powerpc/include/pmap.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h
index b2a3683..e70011d 100644
--- a/sys/powerpc/include/pmap.h
+++ b/sys/powerpc/include/pmap.h
@@ -94,7 +94,7 @@ typedef struct pmap *pmap_t;
struct pvo_entry {
LIST_ENTRY(pvo_entry) pvo_vlink; /* Link to common virt page */
LIST_ENTRY(pvo_entry) pvo_olink; /* Link to overflow entry */
- LIST_ENTRY(pvo_entry) pvo_plink; /* Link to pmap entries */
+ RB_ENTRY(pvo_entry) pvo_plink; /* Link to pmap entries */
union {
struct pte pte; /* 32 bit PTE */
struct lpte lpte; /* 64 bit PTE */
@@ -104,6 +104,9 @@ struct pvo_entry {
uint64_t pvo_vpn; /* Virtual page number */
};
LIST_HEAD(pvo_head, pvo_entry);
+RB_HEAD(pvo_tree, pvo_entry);
+int pvo_vaddr_compare(struct pvo_entry *, struct pvo_entry *);
+RB_PROTOTYPE(pvo_tree, pvo_entry, pvo_plink, pvo_vaddr_compare);
#define PVO_PTEGIDX_MASK 0x007UL /* which PTEG slot */
#define PVO_PTEGIDX_VALID 0x008UL /* slot is valid */
@@ -136,7 +139,7 @@ struct pmap {
struct pmap *pmap_phys;
struct pmap_statistics pm_stats;
- struct pvo_head pmap_pvo;
+ struct pvo_tree pmap_pvo;
};
struct md_page {
OpenPOWER on IntegriCloud