summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2013-04-07 01:30:51 +0000
committeralc <alc@FreeBSD.org>2013-04-07 01:30:51 +0000
commita9ceed102aaf97bb43a772120af221961e452fa0 (patch)
tree2e48b9fc5cb989c737afb68b4be8f812d8a5c804
parent1024a8f1c34f17dab1fad8bf4e86fba8eb353b4b (diff)
downloadFreeBSD-src-a9ceed102aaf97bb43a772120af221961e452fa0.zip
FreeBSD-src-a9ceed102aaf97bb43a772120af221961e452fa0.tar.gz
Micro-optimize the order of struct vm_radix_node's fields. Specifically,
arrange for all of the fields to start at a short offset from the beginning of the structure. Eliminate unnecessary masking of VM_RADIX_FLAGS from the root pointer in vm_radix_getroot(). Sponsored by: EMC / Isilon Storage Division
-rw-r--r--sys/vm/vm_radix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c
index c8b8d58..ac08ef2 100644
--- a/sys/vm/vm_radix.c
+++ b/sys/vm/vm_radix.c
@@ -94,10 +94,10 @@ __FBSDID("$FreeBSD$");
((vm_pindex_t)1 << ((VM_RADIX_LIMIT - (lev)) * VM_RADIX_WIDTH))
struct vm_radix_node {
- void *rn_child[VM_RADIX_COUNT]; /* Child nodes. */
vm_pindex_t rn_owner; /* Owner of record. */
uint16_t rn_count; /* Valid children. */
uint16_t rn_clev; /* Current level. */
+ void *rn_child[VM_RADIX_COUNT]; /* Child nodes. */
};
static uma_zone_t vm_radix_node_zone;
@@ -175,7 +175,7 @@ static __inline struct vm_radix_node *
vm_radix_getroot(struct vm_radix *rtree)
{
- return ((struct vm_radix_node *)(rtree->rt_root & ~VM_RADIX_FLAGS));
+ return ((struct vm_radix_node *)rtree->rt_root);
}
/*
OpenPOWER on IntegriCloud