From nobody Sat Sep 24 13:38:40 2022 X-Original-To: bugs@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 4MZVTt01kdz4ch1f for ; Sat, 24 Sep 2022 13:38:42 +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 4MZVTs63LVz43kp for ; Sat, 24 Sep 2022 13:38:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 4MZVTs52n2z15bj for ; Sat, 24 Sep 2022 13:38:41 +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 28ODcfQq092744 for ; Sat, 24 Sep 2022 13:38:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 28ODcfAK092743 for bugs@FreeBSD.org; Sat, 24 Sep 2022 13:38:41 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: bugs@FreeBSD.org Subject: [Bug 265974] SMR has several missing barriers Date: Sat, 24 Sep 2022 13:38:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664026721; 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=A/Nd87BfeaWgEhPF6JKUXY3y6I7oe5MyaaKLax2aFo0=; b=LFEmQEl43q3K7zXIGxpzSFCkqcLa67tsJ9u1/WPUmGCj8XkJ0i1/dzaCaPdXEskeKJcE1s jb8ofjq7u7mAEdSc6qCKONBOeYlA4L+bTFaGYrkuuYFjjIRadgMb0VY+hHpXyg9nyf424r Zbsscbw5P8oSaJeVZc63hsIizcYe8diVDH1osK1H4JgKVKyYoclS7+Kr6PExBOwD3zlECM 7AWTy+49iK9cSLrBxuthdO4iuLyMx1VMNhR46fNRbE9BRe2JW0iSy08YE228paeK7SuQ4+ thCjtcSqTAeiw4SRNNnyNib3y9XUDGMWJYydNNlk/BP+uMhZGpLH4d6KLkRVsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664026721; a=rsa-sha256; cv=none; b=i6+Z04IDJUa5TDm+JdNRpj+E7RS1d/wX50lQaY+B5qy0MXH3Pqphjl9dYX21TTP0bhXKsr QyHv3aPpHAIOwuhNxkF+Are2+xvQ1ObxaPvLxK+g9mrvBIkromDxUuTfub4Q6CZ+Wz2ryh H9nqsvMflYWzU1P1HK8xoXLR+mvwzk1as8vyvZ/hvLCQ5FgVCIoHC6DADvil/+EJ0CTrtK vFA19nRXPnIudgbtBc011LKB2Dtze/a+sproSfuRnJA+L63VTc3hP+GRuMJ82LeoNq8dhD FS4AVoow933Wzqnz4ypvNYNFT5joNwAjXHX4yC8uTLZnZcRnoPpU3xP33cSFfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265974 --- Comment #13 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D8694fd333556addb97acfff1feca6a1e3= 89201ce commit 8694fd333556addb97acfff1feca6a1e389201ce Author: Mark Johnston AuthorDate: 2022-09-24 13:18:04 +0000 Commit: Mark Johnston CommitDate: 2022-09-24 13:18:04 +0000 smr: Fix synchronization in smr_enter() smr_enter() must publish its observed read sequence number before issuing any subsequent memory operations. The ordering provided by atomic_add_acq_int() is insufficient on some platforms, at least on arm64, because it permits reordering of subsequent loads with the store to c_seq. Thus, use atomic_thread_fence_seq_cst() to issue a store-load barrier after publishing the read sequence number. On x86, take advantage of the fact that memory operations are not reordered with locked instructions to improve code density: we can store the observed read sequence and provide a store-load barrier with a single operation. Based on a patch from Pierre Habouzit . PR: 265974 Reviewed by: alc MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D36370 sys/sys/smr.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=