svn commit: r322989 - in head/sys: amd64/include i386/include sys

Conrad Meyer cem at FreeBSD.org
Mon Aug 28 22:28:43 UTC 2017


Author: cem
Date: Mon Aug 28 22:28:41 2017
New Revision: 322989
URL: https://svnweb.freebsd.org/changeset/base/322989

Log:
  Drop CACHE_LINE_SIZE to 64 bytes on x86
  
  The actual cache line size has always been 64 bytes.
  
  The 128 number arose as an optimization for Core 2 era Intel processors.  By
  default (configurable in BIOS), these CPUs would prefetch adjacent cache
  lines unintelligently.  Newer CPUs prefetch more intelligently.
  
  The latest Core 2 era CPU was introduced in September 2008 (Xeon 7400
  series, "Dunnington").  If you are still using one of these CPUs, especially
  in a multi-socket configuration, consider locating the "adjacent cache line
  prefetch" option in BIOS and disabling it.
  
  Reported by:	mjg
  Reviewed by:	np
  Discussed with:	jhb
  Sponsored by:	Dell EMC Isilon

Modified:
  head/sys/amd64/include/param.h
  head/sys/i386/include/param.h
  head/sys/sys/param.h

Modified: head/sys/amd64/include/param.h
==============================================================================
--- head/sys/amd64/include/param.h	Mon Aug 28 22:14:16 2017	(r322988)
+++ head/sys/amd64/include/param.h	Mon Aug 28 22:28:41 2017	(r322989)
@@ -89,7 +89,7 @@
  * CACHE_LINE_SIZE is the compile-time maximum cache line size for an
  * architecture.  It should be used with appropriate caution.
  */
-#define	CACHE_LINE_SHIFT	7
+#define	CACHE_LINE_SHIFT	6
 #define	CACHE_LINE_SIZE		(1 << CACHE_LINE_SHIFT)
 
 /* Size of the level 1 page table units */

Modified: head/sys/i386/include/param.h
==============================================================================
--- head/sys/i386/include/param.h	Mon Aug 28 22:14:16 2017	(r322988)
+++ head/sys/i386/include/param.h	Mon Aug 28 22:28:41 2017	(r322989)
@@ -82,7 +82,7 @@
  * CACHE_LINE_SIZE is the compile-time maximum cache line size for an
  * architecture.  It should be used with appropriate caution.
  */
-#define	CACHE_LINE_SHIFT	7
+#define	CACHE_LINE_SHIFT	6
 #define	CACHE_LINE_SIZE		(1 << CACHE_LINE_SHIFT)
 
 #define PAGE_SHIFT	12		/* LOG2(PAGE_SIZE) */

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Mon Aug 28 22:14:16 2017	(r322988)
+++ head/sys/sys/param.h	Mon Aug 28 22:28:41 2017	(r322989)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1200042	/* Master, propagated to newvers */
+#define __FreeBSD_version 1200043	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,


More information about the svn-src-head mailing list