Date: Sat, 14 Nov 2020 19:19:27 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367691 - head/sys/kern Message-ID: <202011141919.0AEJJR72050256@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011141919.0AEJJR72050256>