Re: Encapsulate io_uring process count calculation

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

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.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2025-06-03 04:35:11 Re: Add CHECK_FOR_INTERRUPTS in polling loop code path in XactLockTableWait
Previous Message Michael Paquier 2025-06-03 04:24:10 Re: bt_index_parent_check and concurrently build indexes