Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2012 17:12:13 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242401 - head/sys/kern
Message-ID:  <201210311712.q9VHCDZI090317@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jimharris
Date: Wed Oct 31 17:12:12 2012
New Revision: 242401
URL: http://svn.freebsd.org/changeset/base/242401

Log:
  Pad and align the callout_cpu mtx to its own cacheline to reduce false
  sharing especially on the default CPU 0 callout_cpu structure.
  
  This will be followed up by attilio@ with a conversion to the new struct
  mtx_padalign but doing this manual conversion first gives an easy MFC
  candidate since mtx_padalign is a more extensive system change.
  
  Sponsored by:	Intel
  Reviewed by:	jeff, attilio
  MFC after:	1 week

Modified:
  head/sys/kern/kern_timeout.c

Modified: head/sys/kern/kern_timeout.c
==============================================================================
--- head/sys/kern/kern_timeout.c	Wed Oct 31 17:01:56 2012	(r242400)
+++ head/sys/kern/kern_timeout.c	Wed Oct 31 17:12:12 2012	(r242401)
@@ -119,8 +119,8 @@ struct cc_mig_ent {
  *	when the callout should be served.
  */
 struct callout_cpu {
-	struct cc_mig_ent	cc_migrating_entity;
 	struct mtx		cc_lock;
+	struct cc_mig_ent	cc_migrating_entity __aligned(CACHE_LINE_SIZE);
 	struct callout		*cc_callout;
 	struct callout_tailq	*cc_callwheel;
 	struct callout_list	cc_callfree;



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