diff options
author | alc <alc@FreeBSD.org> | 2013-04-07 01:30:51 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2013-04-07 01:30:51 +0000 |
commit | a9ceed102aaf97bb43a772120af221961e452fa0 (patch) | |
tree | 2e48b9fc5cb989c737afb68b4be8f812d8a5c804 | |
parent | 1024a8f1c34f17dab1fad8bf4e86fba8eb353b4b (diff) | |
download | FreeBSD-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.c | 4 |
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); } /* |