Thread
Commits
-
Fix copy-pasto with process count calculation in method_io_uring.c
- b87163e5f384 18.0 landed
-
Encapsulate io_uring process count calculation
Japin Li <japinli@hotmail.com> — 2025-06-03T04:16:21Z
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. -- Regards, Japin Li
-
Re: Encapsulate io_uring process count calculation
Michael Paquier <michael@paquier.xyz> — 2025-06-03T04:27:15Z
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
-
Re: Encapsulate io_uring process count calculation
Japin Li <japinli@hotmail.com> — 2025-06-04T03:12:07Z
On Tue, 03 Jun 2025 at 13:27, Michael Paquier <michael@paquier.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
-
Re: Encapsulate io_uring process count calculation
Michael Paquier <michael@paquier.xyz> — 2025-06-05T00:52:40Z
On Wed, Jun 04, 2025 at 11:12:07AM +0800, Japin Li wrote: > On Tue, 03 Jun 2025 at 13:27, Michael Paquier <michael@paquier.xyz> wrote: >> 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. Hearing nothing, applied that, then. -- Michael