[Bug 272238] False sharing with pthread rw and spin locks leads to severe perf degradation

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 27 Jun 2023 11:57:07 UTC

--- Comment #5 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:


commit a6c0d801ca5934bb9b9cca6870ea7406d5db0641
Author:     Greg Becker <becker.greg@att.net>
AuthorDate: 2023-06-27 01:08:29 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-06-27 11:56:44 +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

    [mjg: massaged the commit message and the patch to use aligned_alloc
    instead of malloc]

    PR:     272238
    MFC after:      1 week

 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.