aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_sched.c')
-rw-r--r--sys/kern/kern_sched.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c
index 0aebf5b..b7e6af5 100644
--- a/sys/kern/kern_sched.c
+++ b/sys/kern/kern_sched.c
@@ -58,7 +58,13 @@ static size_t nthread = 0;
/*
* Thread queue lock - all operations to `td_queue'
* must be done with this lock acquired.
+ *
+ * This lock is aligned on a cache line boundary to ensure
+ * it has its own cacheline to reduce contention. This is
+ * because it is constantly acquired and released on every
+ * processor.
*/
+__cacheline_aligned
static struct spinlock tdq_lock = {0};
/*