summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/sparc64/tsb.c
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-12-21 22:43:19 +0000
committerjake <jake@FreeBSD.org>2002-12-21 22:43:19 +0000
commite78787e4ef8ed8f3be0d09456ca984a89170e783 (patch)
tree753f9c747cbb5133521415c6ab48f5e198d43220 /sys/sparc64/sparc64/tsb.c
parent94d1ceabe0b85163330b21789aed37043df7a83b (diff)
downloadFreeBSD-src-e78787e4ef8ed8f3be0d09456ca984a89170e783.zip
FreeBSD-src-e78787e4ef8ed8f3be0d09456ca984a89170e783.tar.gz
- Add a pmap pointer to struct md_page, and use this to find the pmap that
a mapping belongs to by setting it in the vm_page_t structure that backs the tsb page that the tte for a mapping is in. This allows the pmap that a mapping belongs to to be found without keeping a pointer to it in the tte itself. - Remove the pmap pointer from struct tte and use the space to make the tte pv lists doubly linked (TAILQs), like on other architectures. This makes entering or removing a mapping O(1) instead of O(n) where n is the number of pmaps a page is mapped by (including kernel_pmap). - Use atomic ops for setting and clearing bits in the ttes, now that they return the old value and can be easily used for this purpose. - Use __builtin_memset for zeroing ttes instead of bzero, so that gcc will inline it (4 inline stores using %g0 instead of a function call). - Initially set the virtual colour for all the vm_page_ts to be equal to their physical colour. This will be more useful once uma_small_alloc is implemented, but basically pages with virtual colour equal to phsyical colour are easier to handle at the pmap level because they can be safely accessed through cachable direct virtual to physical mappings with that colour, without fear of causing illegal dcache aliases. In total these changes give a minor performance improvement, about 1% reduction in system time during buildworld.
Diffstat (limited to 'sys/sparc64/sparc64/tsb.c')
-rw-r--r--sys/sparc64/sparc64/tsb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/sparc64/sparc64/tsb.c b/sys/sparc64/sparc64/tsb.c
index a2293cd..2be5d97 100644
--- a/sys/sparc64/sparc64/tsb.c
+++ b/sys/sparc64/sparc64/tsb.c
@@ -183,8 +183,7 @@ enter:
tp->tte_vpn = TV_VPN(va, sz);
tp->tte_data = data;
- STAILQ_INSERT_TAIL(&m->md.tte_list, tp, tte_link);
- tp->tte_pmap = pm;
+ TAILQ_INSERT_TAIL(&m->md.tte_list, tp, tte_link);
return (tp);
}
OpenPOWER on IntegriCloud