svn commit: r249221 - head/sys/vm
Alan Cox
alc at FreeBSD.org
Sun Apr 7 01:31:18 UTC 2013
Author: alc
Date: Sun Apr 7 01:30:51 2013
New Revision: 249221
URL: http://svnweb.freebsd.org/changeset/base/249221
Log:
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
Modified:
head/sys/vm/vm_radix.c
Modified: head/sys/vm/vm_radix.c
==============================================================================
--- head/sys/vm/vm_radix.c Sat Apr 6 22:30:46 2013 (r249220)
+++ head/sys/vm/vm_radix.c Sun Apr 7 01:30:51 2013 (r249221)
@@ -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);
}
/*
More information about the svn-src-head
mailing list