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 1txYDU-00B4aV-G7 for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Mar 2025 21:23:16 +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 1txYDT-00AmsD-4U for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Mar 2025 21:23:15 +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.94.2) (envelope-from ) id 1txYBe-00Ai48-Sk for pgsql-hackers@lists.postgresql.org; Wed, 26 Mar 2025 21:21:23 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1txYBc-001OG3-11 for pgsql-hackers@postgresql.org; Wed, 26 Mar 2025 21:21:22 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-22423adf751so6408115ad.2 for ; Wed, 26 Mar 2025 14:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1743024078; x=1743628878; darn=postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=WlWVF4zdS9cBctmK8v667NsYZC+WyrNZ34u61I/aanA=; b=OI9F1RhbCFIt2Kq+02tJtX0NJAyWr9q1DF66UO8q3V8bnvcXaDL5VOnTDUrCBKk7Gg TXySI1tapynGUP6zAcII6hUFbY3exQ25eCaH3Xh0xS84+PJYPPic0BHzvmGvKfDLLsrz F48XOo2AEmXvMtvb7bG8P3Onqe6+7pnVzf7Uo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743024078; x=1743628878; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WlWVF4zdS9cBctmK8v667NsYZC+WyrNZ34u61I/aanA=; b=QRX9L3kLdH5YeWM4EBeHm14V5uGHOC5+SgQVn9gdJT/9EH2LyDaQ2PUrB5V3pbF91F 5HS9dM4OD9m9M/4MdwFpWqyAPEPnuZzdiTI2wYJQqM5opFtTN8mdxkW+jrGzceHvWMYH vVo5VGFOfo01yfsjQmeB0K56eJNc/cxeCw6FJRu2SfBCVbGh6KxJay5jDBzqUt/9n4HB pTM7hUc6jwq9SV+Sju/iN0sBPpaYw4tCraE24nunXJmR50Ie6I6g6S89OAfbNPH/ErgL I2MZqQW5bKUMvdHAgYShyZHifq5PpNlTQ8kXdbFTU8h33GDfN6HyNMNXzv9FasBVqKm/ gP8g== X-Forwarded-Encrypted: i=1; AJvYcCV+k+S4M7vG1qoBX3Q688IiVECcJbJ+4/IwOIGRmlr1jyl/db94a1YZQRahNC3l6Rmp+CKZsbo+FvhiryGx@postgresql.org X-Gm-Message-State: AOJu0YxTTLMTdOA6xJi57fKVbRcSuj5kd0oeP9p2QEwcM/r8XagOGaoA YixEbtdrb3wUX1EI/JafgQfIHfgWIZeOEUzEdfM9cygdHTqguwioCkTPtrvTjA== X-Gm-Gg: ASbGncvewvysV4COGB01y8WSWYgi+VH519O9CnPacbu4F3rOJ8o/R56sk6HGf7vwrhB rESG/WHRjMrYyArzJmi8pPYXajt3PrvhX1PdaUb0ytdmSgCFYHC7Fng4PMDMfGoOHu3URDZ5OCL FeUnoS4gXwoPF9Nv0ty5bcjuLFlljIppSVSp27t3niGVtVDwxTzBdTyH7rUa5rr7EaSpPa1b8fn zXwsboORqL1Hbw7OsqcnG1NMYpM0HNdLvfsNnUPXSkb5DoOTJrBzMwrrrl3i1x+VVKouUm9s9u0 lV4tL3bYHgarihCQgVK28CdU890obJiMEDQHn8Rp5g== X-Google-Smtp-Source: AGHT+IG2LZ9MFtEPi3XuCOp56tQhtPKAMupPpc8eWIw3P5grA3d0AxM98fhdA44hsv85hLP0w7YH5A== X-Received: by 2002:a17:902:c950:b0:223:501c:7576 with SMTP id d9443c01a7336-22804850a7fmr17504325ad.12.1743024078030; Wed, 26 Mar 2025 14:21:18 -0700 (PDT) Received: from google.com ([2601:647:5600:80d0::31cd]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22780f4bbe5sm114859935ad.72.2025.03.26.14.21.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Mar 2025 14:21:17 -0700 (PDT) Date: Wed, 26 Mar 2025 14:21:15 -0700 From: Noah Misch To: Andres Freund Cc: Antonin Houska , pgsql-hackers@postgresql.org, Thomas Munro , Heikki Linnakangas , Robert Haas , Jakub Wartak , Jelte Fennema-Nio Subject: Re: AIO v2.5 Message-ID: <20250326212115.ab.nmisch@google.com> References: <4b3f32ug3cayekysqlgspz2qjmeb7lca3gvazayglxr2m3d4dv@il33accgsji7> <17906.1741863183@localhost> <3yxd5r23zly5bytvgyktbxtxq2r3gbpi7xd4dugevh3h4w4q6c@lu6oatjjpltz> <6ak556uyqiptdwjaci4kbi5eykwkmzqgkbtkyaosjnopjhncrc@2v4ac2jwyz22> <20250326001915.bc.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Mar 26, 2025 at 04:33:49PM -0400, Andres Freund wrote: > On 2025-03-25 17:19:15 -0700, Noah Misch wrote: > > On Mon, Mar 24, 2025 at 09:18:06PM -0400, Andres Freund wrote: > > Second, the aio_internal.h comment changes discussed in > > postgr.es/m/20250325155808.f7.nmisch@google.com and earlier. > > Here's my current version of that: > > * Note that the externally visible functions to start IO > * (e.g. FileStartReadV(), via pgaio_io_start_readv()) move an IO from > * PGAIO_HS_HANDED_OUT to at least PGAIO_HS_STAGED and at most > * PGAIO_HS_COMPLETED_LOCAL (at which point the handle will be reused). > > Does that work? Yes. > I think I'll push that as part of the comment updates patch instead of > "Implement support for reads in smgr/md/fd", unless you see a reason to do so > differently. I'd have done it in the patch to s/prep/start/, but then it would > reference functions that don't exist yet... Agreed. > > > Subject: [PATCH v2.12 06/28] aio: Add README.md explaining higher level design > > > > Ready for commit > > Cool. > > Comments in it reference PGAIO_HCB_SHARED_BUFFER_READV, so I'm inclined to > reorder it until after "bufmgr: Implement AIO read support". Agreed. > > For example, this local variable could become add_to_nblocks_done instead. > > I named it "newly_read_blocks", hope that works? Yes.