[Bug 272238] False sharing with pthread rw and spin locks leads to severe perf degradation
Date: Wed, 05 Jul 2023 12:35:17 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272238 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=cbca929869a818c9b3353753df71210816a126d6 commit cbca929869a818c9b3353753df71210816a126d6 Author: Greg Becker <becker.greg@att.net> AuthorDate: 2023-06-27 01:08:29 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-07-05 12:34:09 +0000 libpthread: allocate rwlocks and spinlocks in dedicated cachelines Reduces severe performance degradation due to false-sharing. Note that this does not account for hardware which can perform adjacent cacheline prefetch. [mjg: massaged the commit message and the patch to use aligned_alloc instead of malloc] PR: 272238 MFC after: 1 week (cherry picked from commit a6c0d801ca5934bb9b9cca6870ea7406d5db0641) lib/libthr/thread/thr_pspinlock.c | 3 ++- lib/libthr/thread/thr_rwlock.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.