From owner-dev-commits-src-all@freebsd.org Mon Feb 1 13:55:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF2CD52AA84 for ; Mon, 1 Feb 2021 13:55:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DTqGl6DKhz3RDP for ; Mon, 1 Feb 2021 13:55:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f54.google.com with SMTP id i9so13276068wmq.1 for ; Mon, 01 Feb 2021 05:55:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=R8/6DAYD7FaIAfNhFbxziww5jJQWPAUE5ZPZA3Kxl+Y=; b=pa9yY1DRBpZdE2xiys7X0/MMYSNBczpQLj9sS9Jmhab934CkHW1NJ+KCZ0gu+hfBp5 MmmDg0f2qm4WG5BGY0YdBbm2P8FnPt9HmxaEcQ7V9FHk2mEwqFnrFxs4oWc6p1jnerhT rVuRroLk0nf10vY5zz0O8LK9kQMxlK/FRyAnsPscXB2isZ53dbq3pulFL/KdQJ7SYjSU yEWYDMAkaimTU5tTqnh7IxqTq9CDMAgbCnhcMwdZoJCmyNwkkH6Ton9YZJmqTB4tB1qJ OTpqOoE3blf0yaHd4fXTcFBm7/8zBF05w9P2rLfELiav2lj9sa4CEUWPsYtsuoZg4kJV wvgg== X-Gm-Message-State: AOAM532Bg/Vjavt0Cua4gYMnHpe6vamsu1whj2rI7axmZPKkqdd6gXzq vAFMSgSGmV8NrqEuahnmhBBi/A== X-Google-Smtp-Source: ABdhPJxGQ6h1Qng+YU28tNu8Jc35IsYv7ZJEa+RUSbFFf8i14eeC+gshJcRIfbgW9yLhOpn9MxKMJA== X-Received: by 2002:a1c:7d0c:: with SMTP id y12mr15172647wmc.184.1612187758125; Mon, 01 Feb 2021 05:55:58 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id b132sm21194988wmh.21.2021.02.01.05.55.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2021 05:55:57 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: fc301c224b27 - stable/13 - atomic: add stub atomic_load_consume_ptr From: Jessica Clarke In-Reply-To: <84f152e1-b1ed-b331-ab45-261dd3996903@selasky.org> Date: Mon, 1 Feb 2021 13:55:55 +0000 Cc: Mateusz Guzik , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-branches@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202102011240.111CeiX9094867@gitrepo.freebsd.org> <84f152e1-b1ed-b331-ab45-261dd3996903@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DTqGl6DKhz3RDP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2021 13:56:00 -0000 On 1 Feb 2021, at 13:53, Hans Petter Selasky wrote: > On 2/1/21 1:40 PM, Mateusz Guzik wrote: >> +/* >> + * Currently all architectures provide acquire and release fences on = their own, >> + * but they don't provide consume. Kludge below allows relevant code = to stop >> + * openly resorting to the stronger acquire fence, to be sorted out. >> + */ >> +#define atomic_load_consume_ptr(p) \ >> + ((__typeof(*p)) atomic_load_acq_ptr((uintptr_t *)p)) >> + >=20 > Are you missing: >=20 > CTASSERT(sizeof(*p) =3D=3D sizeof(void *)) ???? I also commented on the head commit that this is a waste of time and will likely never be anything other than an acquire, but never got a reply. Jess