svn commit: r367691 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Sat Nov 14 19:19:27 UTC 2020


Author: mjg
Date: Sat Nov 14 19:19:27 2020
New Revision: 367691
URL: https://svnweb.freebsd.org/changeset/base/367691

Log:
  thread: pad tid lock
  
  On a kernel with other changes this bumps 104-way thread creation/destruction
  from 0.96 mln ops/s to 1.1 mln ops/s.

Modified:
  head/sys/kern/kern_thread.c

Modified: head/sys/kern/kern_thread.c
==============================================================================
--- head/sys/kern/kern_thread.c	Sat Nov 14 19:16:39 2020	(r367690)
+++ head/sys/kern/kern_thread.c	Sat Nov 14 19:19:27 2020	(r367691)
@@ -135,7 +135,7 @@ static int thread_unsuspend_one(struct thread *td, str
     bool boundary);
 static void thread_free_batched(struct thread *td);
 
-static struct mtx tid_lock;
+static __exclusive_cache_line struct mtx tid_lock;
 static bitstr_t *tid_bitmap;
 
 static MALLOC_DEFINE(M_TIDHASH, "tidhash", "thread hash");


More information about the svn-src-head mailing list