aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_rwlock.c
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2017-09-06 20:33:33 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2017-09-06 20:33:33 +0000
commit574adb65c8d1d75db2ef11f5a44cfbae7842f7b7 (patch)
tree4da6590b2d3ded7e878a200d16ac463512a9fde6 /sys/kern/kern_rwlock.c
parentcf558f10a7abeda01e8e79a571df6af5c79bdd5b (diff)
downloadsrc-574adb65c8d1d75db2ef11f5a44cfbae7842f7b7.tar.gz
src-574adb65c8d1d75db2ef11f5a44cfbae7842f7b7.zip
Sprinkle __read_frequently on few obvious places.
Note that some of annotated variables should probably change their types to something smaller, preferably bit-sized.
Notes
Notes: svn path=/head/; revision=323236
Diffstat (limited to 'sys/kern/kern_rwlock.c')
-rw-r--r--sys/kern/kern_rwlock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index 1de8b1366e70..61e8c3615330 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -93,14 +93,14 @@ struct lock_class lock_class_rw = {
};
#ifdef ADAPTIVE_RWLOCKS
-static int rowner_retries = 10;
-static int rowner_loops = 10000;
+static int __read_frequently rowner_retries = 10;
+static int __read_frequently rowner_loops = 10000;
static SYSCTL_NODE(_debug, OID_AUTO, rwlock, CTLFLAG_RD, NULL,
"rwlock debugging");
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 __read_mostly rw_delay;
+static struct lock_delay_config __read_frequently rw_delay;
SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_base, CTLFLAG_RW, &rw_delay.base,
0, "");