Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Apr 2013 01:30:51 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r249221 - head/sys/vm
Message-ID:  <201304070130.r371UpUx050911@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304070130.r371UpUx050911>