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.96) (envelope-from ) id 1vWNaQ-000BIT-33 for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Dec 2025 23:39:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vWNaP-004kD4-2t for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Dec 2025 23:39:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vWNaO-004kCw-3D for pgsql-hackers@lists.postgresql.org; Thu, 18 Dec 2025 23:39:10 +0000 Received: from fout-b1-smtp.messagingengine.com ([202.12.124.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vWNaJ-001V5w-2D for pgsql-hackers@postgresql.org; Thu, 18 Dec 2025 23:39:09 +0000 Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id 16EF61D00079; Thu, 18 Dec 2025 18:39:02 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Thu, 18 Dec 2025 18:39:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1766101141; x=1766187541; bh=kHxGP/mENV fR0SS81R551mP+pqn732ozg59344FGUHQ=; b=mc5Zv679Zbw0FjF1+aOpag3aO6 AoScehEA+Nza2OTAW4kcr+NKYnavOKg08JVOrpzBuQWsHXwgXiYoFIq7yocN0jo8 HTOeudgE9rmHt43L236PsJx0+90P1fAit/DYcUMl/MMIpWhZEKPGXG/mrVW+eFgz gCE6ThHe71/bvirnzCnE0McfzhTvhbuRwBaCyrxq+nq7DO8ltuCONdpmysirrR/Z qOhxSUGjpaLLl7MnFuby1FxfH8XZ/NNeaf51lbHWCWD3y/JyQeCfE7xbP5mPtZhI MhUydbbfBMI4T6bNBkzR8jsvOdbykg0vhh8BH4ilF02+jmKt6v2ulgGvZA8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1766101141; x=1766187541; bh=kHxGP/mENVfR0SS81R551mP+pqn732ozg59 344FGUHQ=; b=fmXhLbNkgRDALkH2fD9HpiUUYj6VFgL2KKV9vMkoDxYGxG9ZVuf RJLpACmCAHw4KA99W1qaA44de3yujZd4exhqtn+ESIcnw343oGTiU/MSUWGRt7KF WAe7Zk9YUGyBQapr02PscRig4AJaHZwhaP5zy+GcEnxjWY1MDxOeY/aDDeQpH6kD s02sxKYlt+LmNd4FF3Iv4ROjH5zma6qut/yYRJnLGXTKqGzBzIRpD1GrNBTcOSy0 byrNiAZcA4o32Tj5qveBoJEN9P2OdnzEr6VEsYyfCa9ysrBEgHSaVYeyYfrMg51g Itw0J2bnhqCffDqK9i2tZvL4EImpzc8HT+w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdegieejiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehmtdfsredttddvnecuhfhrohhmpeetnhgurhgvshcu hfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrghtth gvrhhnpeeffedujefggffhgeehudffudeijeegtdekjefhveeiveegkeegkeelleejfeek ieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnh gurhgvshesrghnrghrrgiivghlrdguvgdpnhgspghrtghpthhtohepkedpmhhouggvpehs mhhtphhouhhtpdhrtghpthhtohepsghovghkvgifuhhrmhdophhoshhtghhrvghssehgmh grihhlrdgtohhmpdhrtghpthhtohepmhgvlhgrnhhivghplhgrghgvmhgrnhesghhmrghi lhdrtghomhdprhgtphhtthhopehmihgthhgrvghlrdhprghquhhivghrsehgmhgrihhlrd gtohhmpdhrtghpthhtoheprhhosggvrhhtmhhhrggrshesghhmrghilhdrtghomhdprhgt phhtthhopehthhhomhgrshdrmhhunhhrohesghhmrghilhdrtghomhdprhgtphhtthhope hhlhhinhhnrghkrgesihhkihdrfhhipdhrtghpthhtohepnhhorghhsehlvggruggsohgr thdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvsh hqlhdrohhrgh X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 Dec 2025 18:39:01 -0500 (EST) Date: Thu, 18 Dec 2025 18:39:00 -0500 From: Andres Freund To: Heikki Linnakangas Cc: Melanie Plageman , Matthias van de Meent , pgsql-hackers@postgresql.org, Thomas Munro , Noah Misch , Robert Haas , Michael Paquier Subject: Re: Buffer locking is special (hints, checksums, AIO writes) Message-ID: References: <3w7v3w6a57jnssokap4k7thoekig72flnyhd4wp3yftzdd7lm7@f6lpcfen6hr7> <6rgb2nvhyvnszz4ul3wfzlf5rheb2kkwrglthnna7qhe24onwr@vw27225tkyar> <3nce7i72ayzkunai6mkz24ckbxk74jodz4ua2chcdrwppxlxcd@w6x5kfkjrkru> <1108f18d-cf7c-4f17-b29c-a119fe42f7e5@iki.fi> <5dwlfu2jyzkyf3nrlzxxblxctb6xio5es73ptgsahjnmfu5miu@772rc764hfhi> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="lbbj3oq7cjvyhmbk" Content-Disposition: inline In-Reply-To: <5dwlfu2jyzkyf3nrlzxxblxctb6xio5es73ptgsahjnmfu5miu@772rc764hfhi> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --lbbj3oq7cjvyhmbk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On 2025-12-18 17:06:43 -0500, Andres Freund wrote: > I'll try to come up with a combined patch that applies the optimizations in > LWLockWaitListLock() and LockBufHdr() to each other. Attached is a rebased version of this patch series, with the above patch as 0001. The later patches have a lot, but not yet all, of Melanie's feedback addressed. I mainly am sending them because cfbot wanted a rebase anyway. I'm mainly not yet happy with how 0007 changes buf_internals.h, some more comment work is also needed. 0009 & 0010 still are more for POC than ready to be in-depth reviewed. Greetings, Andres Freund --lbbj3oq7cjvyhmbk Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v8-0001-bufmgr-Optimize-harmonize-LockBufHdr-LWLockWaitLi.patch"