Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jun 2009 08:16:42 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r193695 - user/kmacy/releng_7_2_fcs/sys/kern
Message-ID:  <200906080816.n588GgMV020685@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Mon Jun  8 08:16:42 2009
New Revision: 193695
URL: http://svn.freebsd.org/changeset/base/193695

Log:
  reduce coherence overhead of lock profiling when not in use

Modified:
  user/kmacy/releng_7_2_fcs/sys/kern/subr_lock.c

Modified: user/kmacy/releng_7_2_fcs/sys/kern/subr_lock.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/kern/subr_lock.c	Mon Jun  8 08:10:52 2009	(r193694)
+++ user/kmacy/releng_7_2_fcs/sys/kern/subr_lock.c	Mon Jun  8 08:16:42 2009	(r193695)
@@ -184,12 +184,12 @@ struct lock_prof_type {
 
 struct lock_prof_cpu {
 	struct lock_prof_type	lpc_types[2]; /* One for spin one for other. */
-};
+} __aligned(128);
 
 struct lock_prof_cpu *lp_cpu[MAXCPU];
 
-volatile int lock_prof_enable = 0;
-static volatile int lock_prof_resetting;
+volatile int lock_prof_enable __aligned(64);
+static volatile int lock_prof_resetting __aligned(64);
 
 /* SWAG: sbuf size = avg stat. line size * number of locks */
 #define LPROF_SBUF_SIZE		256 * 400
@@ -233,6 +233,7 @@ lock_prof_init(void *arg)
 {
 	int cpu;
 
+	lock_prof_enable = 1;
 	for (cpu = 0; cpu <= mp_maxid; cpu++) {
 		lp_cpu[cpu] = malloc(sizeof(*lp_cpu[cpu]), M_DEVBUF,
 		    M_WAITOK | M_ZERO);



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