Sprinkle __read_mostly on backoff and lock profiling code.
MFC after: 1 month
This commit is contained in:
parent
0a035fdf3a
commit
5004e7bcb7
@ -27,6 +27,7 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/lockstat.h>
|
||||
#include <sys/sdt.h>
|
||||
@ -61,7 +62,7 @@ SDT_PROBE_DEFINE1(lockstat, , , sx__downgrade, "struct sx *");
|
||||
|
||||
SDT_PROBE_DEFINE2(lockstat, , , thread__spin, "struct mtx *", "uint64_t");
|
||||
|
||||
int lockstat_enabled = 0;
|
||||
int __read_mostly lockstat_enabled;
|
||||
|
||||
uint64_t
|
||||
lockstat_nsecs(struct lock_object *lo)
|
||||
|
@ -140,7 +140,7 @@ struct lock_class lock_class_mtx_spin = {
|
||||
#ifdef ADAPTIVE_MUTEXES
|
||||
static SYSCTL_NODE(_debug, OID_AUTO, mtx, CTLFLAG_RD, NULL, "mtx debugging");
|
||||
|
||||
static struct lock_delay_config mtx_delay = {
|
||||
static struct lock_delay_config __read_mostly mtx_delay = {
|
||||
.initial = 1000,
|
||||
.step = 500,
|
||||
.min = 100,
|
||||
@ -171,7 +171,7 @@ LOCK_DELAY_SYSINIT(mtx_delay_sysinit);
|
||||
static SYSCTL_NODE(_debug, OID_AUTO, mtx_spin, CTLFLAG_RD, NULL,
|
||||
"mtx spin debugging");
|
||||
|
||||
static struct lock_delay_config mtx_spin_delay = {
|
||||
static struct lock_delay_config __read_mostly mtx_spin_delay = {
|
||||
.initial = 1000,
|
||||
.step = 500,
|
||||
.min = 100,
|
||||
|
@ -100,7 +100,7 @@ static SYSCTL_NODE(_debug, OID_AUTO, rwlock, CTLFLAG_RD, NULL,
|
||||
SYSCTL_INT(_debug_rwlock, OID_AUTO, retry, CTLFLAG_RW, &rowner_retries, 0, "");
|
||||
SYSCTL_INT(_debug_rwlock, OID_AUTO, loops, CTLFLAG_RW, &rowner_loops, 0, "");
|
||||
|
||||
static struct lock_delay_config rw_delay = {
|
||||
static struct lock_delay_config __read_mostly rw_delay = {
|
||||
.initial = 1000,
|
||||
.step = 500,
|
||||
.min = 100,
|
||||
|
@ -148,7 +148,7 @@ static SYSCTL_NODE(_debug, OID_AUTO, sx, CTLFLAG_RD, NULL, "sxlock debugging");
|
||||
SYSCTL_UINT(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, "");
|
||||
SYSCTL_UINT(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, "");
|
||||
|
||||
static struct lock_delay_config sx_delay = {
|
||||
static struct lock_delay_config __read_mostly sx_delay = {
|
||||
.initial = 1000,
|
||||
.step = 500,
|
||||
.min = 100,
|
||||
|
@ -213,7 +213,7 @@ struct lock_prof_cpu {
|
||||
|
||||
struct lock_prof_cpu *lp_cpu[MAXCPU];
|
||||
|
||||
volatile int lock_prof_enable = 0;
|
||||
volatile int __read_mostly lock_prof_enable;
|
||||
static volatile int lock_prof_resetting;
|
||||
|
||||
#define LPROF_SBUF_SIZE 256
|
||||
|
Loading…
x
Reference in New Issue
Block a user