Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, okano(dot)naoki(at)jp(dot)fujitsu(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.
Date: 2022-04-01 05:54:53
Message-ID: YkaTrRBo6bk5EZ5F@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, Mar 31, 2022 at 06:46:59PM +0800, Julien Rouhaud wrote:
> So, after more digging it turns out that the patch is supposed to work. If I
> force using the PG_FILE_MAP_LARGE_PAGES, postgres starts and I do see "Locked
> WS" usage with VMMap, with a size in the order of magnitude of my
> shared_buffers.
>
> What is apparently not working on my VM is IsWindowsVersionOrGreater(10, 0,
> 1703). I added some debug around to check what GetVersionEx() [2] is saying,
> and I get:
>
> dwMajorVersion == 6
> dwMinorVersion == 2
> dwBuildNumber == 9200

Okay. Well, I'd like to think that the patch written as-is is
correct. Now your tests are saying the contrary, so I don't really
know what to think about it :)

>> TRUE if the specified version matches, or is greater than, the version of the
>> current Windows OS; otherwise, FALSE.
>
> Isn't that supposed to be the opposite?

I get from the upstream docs that if the runtime version of Windows is
higher than 10.0.1703, IsWindowsVersionOrGreater() should return
true. Perhaps the issue is in the patch and its argument values, but
it does not look straight-forward to know what those values should
be, and there are no examples in the docs to show that, either :/
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2022-04-01 05:59:22 Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.
Previous Message Amit Kapila 2022-04-01 04:39:37 Re: BUG #17438: Logical replication hangs on master after huge DB load

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-04-01 05:59:19 Re: Higher level questions around shared memory stats
Previous Message Fabien COELHO 2022-04-01 05:46:39 Re: psql - add SHOW_ALL_RESULTS option