Re: Encapsulate io_uring process count calculation

From: Japin Li <japinli(at)hotmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Encapsulate io_uring process count calculation
Date: 2025-06-04 03:12:07
Message-ID: ME0P300MB04451E5DA1650BA4245F9515B66CA@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 03 Jun 2025 at 13:27, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> On Tue, Jun 03, 2025 at 12:16:21PM +0800, Japin Li wrote:
>> I've replaced the hardcoded arithmetic expression for calculating TotalProcs
>> within the pgaio_uring_shmem_init() with a call to the dedicated
>> pgaio_uring_procs() function.
>>
>> This can make the code's intent clearer. Simplifies future modifications
>> to the calculation, as it only needs to be updated in one place.
>
> Sounds like a copy-pasto error to me, so good idea to reuse this
> routine. pgaio_uring_procs() is only used for shmem sizing and in a
> check at backend initialization currently.

Yeah, it might be a copy-pasto error.

--
Regards,
Japin Li

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-06-04 03:18:41 Re: Foreign key validation failure in 18beta1
Previous Message Xuneng Zhou 2025-06-04 03:11:17 Re: Proposal: Limitations of palloc inside checkpointer