Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdF8n-004a7g-3w for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Feb 2024 19:53:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rdF8l-00DiUB-KE for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Feb 2024 19:53:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdF8l-00DiRV-AL for pgsql-hackers@lists.postgresql.org; Thu, 22 Feb 2024 19:53:55 +0000 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rdF8h-000U3r-VQ for pgsql-hackers@postgresql.org; Thu, 22 Feb 2024 19:53:54 +0000 Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6e2e6bcc115so260a34.3 for ; Thu, 22 Feb 2024 11:53:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1708631632; x=1709236432; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=1KWuWQZ/aIYhcZu5oijrhmOgiAbBbAgIrMeVK+Fedlc=; b=UtEeRmfDs0LJzy8uNiUkXlTCsexfuejqK7ImyOw1/kQEPKMqKfVr0Vzw2KJIbypVPd 6zduBI5MZiFpnS/PDOPGyhOzOxMfaSzhzvJ/HW2bthOthAAM3szqFfLh+dn9+fn/tsC2 5MHV7zFKSTwUuoJSFqqs1oImV4+IKRddUiU2IJo0u5kjmiG+PkwYX/k0YRFHRf2oZT7t PZH5xlBs7TcES/uQIkh56mNjh+uNgXemNriNNK8drmBx6zbS1zRDJc1Dz9shH5Fgpp8h Mca2s/R/+EOVX074+YU2U2pRE9as+HgUZgi0QHsepSC88rhwDKGfjoZ3CYRkU2CzvksH wjow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708631632; x=1709236432; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=1KWuWQZ/aIYhcZu5oijrhmOgiAbBbAgIrMeVK+Fedlc=; b=W2QXfLcs1BnofSpBkvMfHEUsKzOgI1kfCLlxdM12Xc+bJgqI3bYpn89J4zSlBt+PYN gCn9ZCqftnsIR6GZqJiHlaldF3wtbRAwWtIGxigLtJ6KF08PtfGstzc12JganNjD5koW bgsaThLQEtz1jOsgcQPvLVKvxRK9TggKiwpyE17ujTcf/hLto+PXrRYsmtskTtdlXdpT JbRnBhCyrhwflLYOPvSyE5Mj3/PyD/0aEhoiVloK39I+ItgYLELyTwXr5p7fqG/zUdza g66Db/7skLZKzNyS1pt1REv2MdP17li7qmAJ/4r7858PXycKjmThC18w3c86pRy7moWl WtOQ== X-Forwarded-Encrypted: i=1; AJvYcCXXtYOeoDtHxpJBfYoDPHOyEGGcebwosVXXfd224e64Ba9DMaCjAf8pjRPXMaJTam/jlA1lSo7xE6c5NLuPe0RN1kFi+X2SvPsXYyQl X-Gm-Message-State: AOJu0YxNp9CNa8veHokfHDr4mWGrrDvoc7W6EDLLxuy8rzhplRCw3K+B RJ3+U0F9D//ERJGByC/n2U5SasECPihPJ3vk7ovfL2mzzSjJkIQtcChDZgndOA== X-Google-Smtp-Source: AGHT+IExAjcYjZ9bfK98X3LaTFk3eR6gJcxTEOD84+10UcfwvuaaKxDGsmgS1Jf5lGZznJI9SdMtGg== X-Received: by 2002:a9d:5a02:0:b0:6e2:de7a:8f6e with SMTP id v2-20020a9d5a02000000b006e2de7a8f6emr23933397oth.31.1708631632264; Thu, 22 Feb 2024 11:53:52 -0800 (PST) Received: from jeff-laptop.lan (c-76-102-242-158.hsd1.ca.comcast.net. [76.102.242.158]) by smtp.gmail.com with ESMTPSA id e26-20020aa78c5a000000b006e3809da4fdsm10439133pfd.83.2024.02.22.11.53.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 11:53:51 -0800 (PST) Message-ID: Subject: Re: locked reads for atomics From: Jeff Davis To: Bharath Rupireddy , Nathan Bossart Cc: Andres Freund , pgsql-hackers@postgresql.org Date: Thu, 22 Feb 2024 11:53:50 -0800 In-Reply-To: References: <20231110205128.GB1315705@nathanxps13> <20231110231150.fjm77gup2i7xu6hc@alap3.anarazel.de> <20231111023813.GB1408159@nathanxps13> <20231111024839.op2d2id33x777mll@alap3.anarazel.de> <20231111025529.GA1409540@nathanxps13> <20231127210030.GA140335@nathanxps13> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2024-02-22 at 12:58 +0530, Bharath Rupireddy wrote: > There's some immediate use for reads/writes with barrier semantics - Is this mainly a convenience for safety/readability? Or is it faster in some cases than doing an atomic access with separate memory barriers? Regards, Jeff Davis