From nobody Mon Jan 26 20:30:58 2026 X-Original-To: dev-commits-src-all@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 4f0KtZ268Pz6PZ6j; Mon, 26 Jan 2026 20:31:02 +0000 (UTC) (envelope-from marius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f0KtZ1Rm8z40y5; Mon, 26 Jan 2026 20:31:02 +0000 (UTC) (envelope-from marius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769459462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ueqt6yN+K5R4+zZlyrvV21DieyLoNefNYi86Uy/oT8s=; b=grglkSDFAD7w8E5C/w/NXZqbpUT1UrdSrKSuOuZvA9ddx7uNJscqznIG4AgqcLNhuZDYYp 1tiiHwHYUpTTfe86IIgCoz2pzvpP3N9ULr6ntG/lhTv3Lc0NRnAbcFvkHrul9pw2MQyc/F KbTJRIZ/IANgtFJ1q0/B0W79ajBFR3MjI9tFw8UITC/XBhcBOv9WXzLuouuW1MzogEJHG+ voxX+VPIN3xCqis5BpdcvQV30QZstOJlntOdE/lDUPZ9+J/5GmggDVB6QuS6jdfbTOeeqo m97tsIkG8Se6i279gwiyJBhAmXPHqojK8K6X6TPaFlzApIUVdGyBxMMKj3auxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769459462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ueqt6yN+K5R4+zZlyrvV21DieyLoNefNYi86Uy/oT8s=; b=GdPA4wgei47PZPUnQ4884S2EfrEon1qJWhwkvlk6LjoCbQ9PwTDPC/2i4GYHqq5YNIyknQ WgCiMLs7IlTpBYLE6xZG9GbKcIrzMKVAn8THFQZPAiw4VyMotcPQIE28CXy303iaY/Rkvt Tl+T/rhgLV63qF8lwVEIh/qbQmlYghJaGQTX5jntCJyBH1v/CA2QxAF29gLWJ1/eRVP93F tp4cl5fz9JBRWL7Hcgh2kkhfGDOz45bc1+zHqPBMo5olvjnr7v9doGhYBMMDYccI5205Wl 5dc9VB/dayuHD+6C+vfMay46vE7T5dKDd3S7bJEoAEt0qga76K6yuShQjNN2Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1769459462; a=rsa-sha256; cv=none; b=Jj7Pv8k9RMvjnXUhGHyKqoBFmvSNgHxAe6NyU5SrAQU9buHkwO225bzoftam3SqRarBepP 3y2SpWjBGZOTvy2nvNR4JiOOGuznVg9pBTrnt/AgKAFAoekioQ7Wis3+70s1G9GQoy2qYK TATygS7ZGASPZiaRwhFBKx5Ney/1IOiuvwy1VYRxPpka2o/y+hoBoK7xdhbjQF0iKlblfa En+Ik4sIRhW01w6oW5yPXacZ+YD2fA1feWy7SZbbYFDlhhvV/V+/u+NIkKNvBwrMPTg5ik Snqqb4qyCfO4DliDqX/7OxUTQAfAcxAGy47SCSNuaWow0sP8JnepPXWkwqdVrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from roy.zeist.de (roy.zeist.de [IPv6:2a01:4f9:4a:2169::2]) (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 "roy.zeist.de", Issuer "R13" (not verified)) (Authenticated sender: marius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4f0KtY6WQqz1HQZ; Mon, 26 Jan 2026 20:31:01 +0000 (UTC) (envelope-from marius@freebsd.org) Received: from roy.zeist.de (localhost [127.0.0.1]) by roy.zeist.de (8.18.2/8.18.2/ROY.ZEIST.DE) with ESMTPS id 60QKUwbh006574 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 26 Jan 2026 21:30:58 +0100 (CET) (envelope-from marius@freebsd.org) Received: (from marius@localhost) by roy.zeist.de (8.18.2/8.18.2/Submit) id 60QKUwtv006573; Mon, 26 Jan 2026 21:30:58 +0100 (CET) (envelope-from marius@freebsd.org) Date: Mon, 26 Jan 2026 21:30:58 +0100 From: Marius Strobl To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e769bc771843 - main - sym(4): Employ memory barriers also on x86 Message-ID: References: <69778ef9.39b4d.5c480abe@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Jan 26, 2026 at 06:34:49PM +0200, Konstantin Belousov wrote: > On Mon, Jan 26, 2026 at 03:57:45PM +0000, Marius Strobl wrote: > > The branch main has been updated by marius: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e769bc77184312b6137a9b180c97b87c0760b849 > > > > commit e769bc77184312b6137a9b180c97b87c0760b849 > > Author: Marius Strobl > > AuthorDate: 2026-01-26 13:58:57 +0000 > > Commit: Marius Strobl > > CommitDate: 2026-01-26 15:54:48 +0000 > > > > sym(4): Employ memory barriers also on x86 > > > > In an MP world, it doesn't hold that x86 requires no memory barriers. > It does hold. x86 is much more strongly ordered than all other arches > we currently support. If it does hold, then why is atomic_thread_fence_seq_cst() employing a StoreLoad barrier even on amd64? I agree that x86 is more strongly ordered than the other supported architectures, though. The panic seen matches the typical scenario of even x86 requiring a StoreLoad barrier. For the actual usage of these macros, the use of bus_{space,9}_barrier(9) would be more appropriate, however. On x86, this translates to a "lock addl $0,mem" for BUS_SPACE_BARRIER_READ, which probably would also achieve the intended order. I'd much prefer to just do what Linux still does up until today and be done with it, though. Marius