From nobody Wed Jul 05 12:35:17 2023 X-Original-To: threads@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qwzdd19bTz4lsyG for ; Wed, 5 Jul 2023 12:35:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qwzdc6kPrz4G59 for ; Wed, 5 Jul 2023 12:35:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688560516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ltujsrfvh4omneM4MfadjHIQdbMC2e+Eru/KBIqG2+w=; b=ju8xU0RFzEOdwAyzDUiLR4xRDeroACuQ/fIB8dWhWtoIM9NKN/lrvKE5Va1MbUOTTsZZd9 6oZ4smIvyE9LGp90qfQ99V7F4GFa8NfQwVfqMn74OSDyBIZuDMTmsvVNvCWVTvZAWeMJ0v iowgSZuINRKMovKFfgaqE16+DoWvG3r4UDsmdjW+/vRA7OMMbdmOJ9YVmu1Wohm7al4loz LnH1sOSfMG+1ruyef9GUeRQp4tIBLkKkpYanAKyL1iYfb/R7dQ1u2L67wv+isNb5mQzSAU Gc8Leiws8vsh3BO54oNJaOZZH0+hW9OE2M4eefNnoCyFZan8z7xi+EBtAQQZaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688560516; a=rsa-sha256; cv=none; b=FzOE5DVebNz/6mfuRIrwuozob8WFzndp/rhR3yNFLcplvGzqK4PiPB5ftBC4sM4uQpjeko /7TiFqVJHMQ0hYq5IfygPUNQCNNFEZJnxgLZkKjHG/nltolzE2XC6bqfADulG/SvjnKvTH e+51t7Y3R4aQ1tVLaOx1N/c+00Jwuw0Y9YqzrLfBN/M0fZGfBmhgbD/fBOuqVrerBxxCR8 EChg8PUm2vdxbVgkjWBXQ0Fcb9VH4n3eD3WDnJwyuMgeVcrSKke1R/4inGa4ipKQciHmPE JYzLFqj5p3HpA5XPZS1SLVBuY8ftWbeJic9xJcT8DEp7LSW4SwCgxX/L4QsgEg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qwzdc5rgqzFK2 for ; Wed, 5 Jul 2023 12:35:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 365CZGr6060146 for ; Wed, 5 Jul 2023 12:35:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 365CZGjJ060145 for threads@FreeBSD.org; Wed, 5 Jul 2023 12:35:16 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: threads@FreeBSD.org Subject: [Bug 272238] False sharing with pthread rw and spin locks leads to severe perf degradation Date: Wed, 05 Jul 2023 12:35:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: performance X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-threads@freebsd.org X-BeenThere: freebsd-threads@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272238 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dcbca929869a818c9b3353753df7121081= 6a126d6 commit cbca929869a818c9b3353753df71210816a126d6 Author: Greg Becker AuthorDate: 2023-06-27 01:08:29 +0000 Commit: Mateusz Guzik 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(-) --=20 You are receiving this mail because: You are the assignee for the bug.=