Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qFVNY-0003Nj-96 for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Jul 2023 07:50:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qFVMX-0004HA-DX for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Jul 2023 07:49:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qFVMX-0004H1-33 for pgsql-hackers@lists.postgresql.org; Sat, 01 Jul 2023 07:49:45 +0000 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qFVMU-001QFr-Mb for pgsql-hackers@lists.postgresql.org; Sat, 01 Jul 2023 07:49:43 +0000 Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6b7541d885cso2338477a34.3 for ; Sat, 01 Jul 2023 00:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688197782; x=1690789782; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=l4IW5SntU4y0fxGVpeJ3RkhdybfRXjs4YzHAKQERXT4=; b=XgeKot2ammdxYlKxZg+MYViWm20d1fqXwYE2CzDwnejZ/46eLHUZJtjOJSDNDlSGR+ rIQNR9mMJeTz2GI7aif03PdrywqEPI+4zWQj2NAOCAILtK2oWzg6MuJT3cpkFhGyKN8o WN9d5TPD73PJH2HHID+TAID4OGPcOxtowkhuU0vyo+Yl7B++qxeSwRjwF1ehDSyiuR2N XHzBOX65JQVDLaZ9VBigl9GJ2t9aotX22laYsXCp+aw8siOAaJvaekbCNOvyE70O0SP8 vcYzW+hqhGZsExDpbDr+wZOfrHtdxfC1LoBgySkSdKXyi7uLaAB36bnRnZgSV98HcklB k0gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688197782; x=1690789782; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l4IW5SntU4y0fxGVpeJ3RkhdybfRXjs4YzHAKQERXT4=; b=LYOpnVoMqFXkDcRvrDgL6dSE2dLA0VgxYuXhdWMkXn4jkiVw4ZuVfGuglPtENDSt4x oDHviiGF2r5zGTDjjjNYUqOnjz5LOMbWy0wjUbZhbGHygewJec/49KIaXR046Sinm6yM Q1K/0hzPPHDKAnnQNTBBAaoZhio7FIGumTVYV8kqVKvsIpQsLPY3UZ1dI0IAwF+Dq1Gk rIXUA5D+qNIdj6MBsQncerWAyZv5EwfcHikBr+9HamjCLI48TOYshqa+TNlz9YU2cFSG JYrBS4BFtI4MsGpAHtsGkiuzurYrGScXsgBsKcRhD2W3dlaTJawibfCsHFS/Kwe7kOQD B2BQ== X-Gm-Message-State: ABy/qLbFn7guJtu3oJz4zfSRTduQuRSuOF5dcbJLsOqU4HhI6qMWmOC/ 04bqRQrR5ryu+9zRQNM2knB0HKNwfyM= X-Google-Smtp-Source: ACHHUZ5rEAGNobJHdkig+ObZrRxa8cZZKP1BWHhr5jsdu3eefS7H/YEO5meiIY4wSAL1tW9x8+uH/A== X-Received: by 2002:a05:6871:c06:b0:1b0:80ba:be2b with SMTP id ve6-20020a0568710c0600b001b080babe2bmr5668778oab.38.1688197781898; Sat, 01 Jul 2023 00:49:41 -0700 (PDT) Received: from jrouhaud (2001-b011-1005-79ab-64da-2485-b7d6-0db7.dynamic-ip6.hinet.net. [2001:b011:1005:79ab:64da:2485:b7d6:db7]) by smtp.gmail.com with ESMTPSA id 10-20020a17090a19ca00b0026333ad02c1sm6215046pjj.10.2023.07.01.00.49.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jul 2023 00:49:40 -0700 (PDT) Date: Sat, 1 Jul 2023 15:49:36 +0800 From: Julien Rouhaud To: pgsql-hackers@lists.postgresql.org Subject: Outdated description of PG_CACHE_LINE_SIZE Message-ID: <20230701074936.p3qcssl4t7murt2q@jrouhaud> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="256bqa7v6e5tja3n" Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --256bqa7v6e5tja3n Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I just noticed that the comment for PG_CACHE_LINE_SIZE still says that "it's currently used in xlog.c", which hasn't been true for quite some time. PFA a naive patch to make the description more generic. --256bqa7v6e5tja3n Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-Fix-PG_CACHE_LINE_SIZE-description.patch" From a554ee9ca3558c1cc67b2f4024c13b26aacff3c9 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Sat, 1 Jul 2023 15:41:54 +0800 Subject: [PATCH v1] Fix PG_CACHE_LINE_SIZE description. PG_CACHE_LINE_SIZE was originally only used in xlog.c, but this hasn't been true for a very long time and is now wildly used, so modify its description to not mention any explicit source code file. Author: Julien Rouhaud Reviewed-by: FIXME Discussion: FIXME --- src/include/pg_config_manual.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h index a1a93ad706..01fe2af499 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h @@ -218,12 +218,11 @@ /* * Assumed cache line size. This doesn't affect correctness, but can be used - * for low-level optimizations. Currently, this is used to pad some data - * structures in xlog.c, to ensure that highly-contended fields are on - * different cache lines. Too small a value can hurt performance due to false - * sharing, while the only downside of too large a value is a few bytes of - * wasted memory. The default is 128, which should be large enough for all - * supported platforms. + * for low-level optimizations. This is mostly used to pad various data + * structures, to ensure that highly-contended fields are on different cache + * lines. Too small a value can hurt performance due to false sharing, while + * the only downside of too large a value is a few bytes of wasted memory. The + * default is 128, which should be large enough for all supported platforms. */ #define PG_CACHE_LINE_SIZE 128 -- 2.37.0 --256bqa7v6e5tja3n--