public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Nathan Bossart <[email protected]>
Cc: Anthonin Bonnefoy <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Fix rounding method used to compute huge pages
Date: Fri, 23 Jan 2026 08:04:29 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <aXKVfaTntXRn1V0m@nathan>
References: <CAO6_Xqq2vZbva0R9eQSY0p2kfksX2aP4r=+Z_q1HBYNU=m8bBg@mail.gmail.com>
<aXKVfaTntXRn1V0m@nathan>
On Thu, Jan 22, 2026 at 03:24:13PM -0600, Nathan Bossart wrote:
> Oops, it looks like this is my fault. I doubt this causes any practical
> problems, but we might as well fix it.
And it's something I have committed.
> + if (size_b % hp_size != 0)
> + size_b = add_size(size_b, hp_size - (size_b % hp_size));
> + hp_required = size_b / hp_size;
>
> I think we could simplify this a tad:
>
> hp_required = size_b / hp_size;
> if (size_b % hp_size != 0)
> hp_required = add_size(hp_required, 1);
FWIW, we have always been kind of sloppy with slightly overestimating
the shmem size required in the backend code, and here it's just a one.
I don't see a strong need for a backpatch here. Of course, no
objections in adjusting that on HEAD. Nathan, you are planning to
take care of that as original author? This should fall under my
bucket as original committer, but as you were an author, feel free to
take priority here of course.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Fix rounding method used to compute huge pages
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox