From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Wilm Hoyer <W(dot)Hoyer(at)dental-vision(dot)de> |
Cc: | pgsql-hackers(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-26 04:54:35 |
Message-ID: | Ymd7C+QineDpi7Eb@jrouhaud |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Hi,
Please keep the list in copy, especially if that's about Windows specific as
I'm definitely not very knowledgeable about it.
On Fri, Apr 01, 2022 at 09:18:03AM +0000, Wilm Hoyer wrote:
>
> If you don't wanna go the manifest way, maybe the RtlGetVersion function is the one you need:
> https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlgetversion?redirectedfrom=MSDN
Thanks for the info! I tried to use the function but trying to include either
wdm.h or Ntddk.h errors out. Unfortunately I don't know how to look for a file
in Windows so I don't even know if those files are present.
I searched a bit and apparently some people are using this function directly
opening some dll, which seems wrong.
> Another Idea on windows machines would be to use the commandline to execute
> ver in a separate Process and store the result in a file.
That also seems hackish, I don't think that we want to rely on something like
that.
> >> While winver.exe on the same vm says windows 11, version 21H2, build 22000.493.
>
> > So, what GetVersionEx returns is actually "it depends", and this is documented:
>
> >> With the release of Windows 8.1, the behavior of the GetVersionEx API
> >> has changed in the value it will return for the operating system
> >> version. The value returned by the GetVersionEx function now depends
> >> on how the application is manifested.
> >>
> >> Applications not manifested for Windows 8.1 or Windows 10 will return
> >> the Windows 8 OS version value (6.2). Once an application is
> >> manifested for a given operating system version, GetVersionEx will
> >> always return the version that the application is manifested for in
> >> future releases. To manifest your applications for Windows 8.1 or
> >> Windows 10, refer to Targeting your application for Windows.
>
> The documentation is a bit unclear - with the correct functions you should get the:
> Minimum( actualOS-Version, Maximum(Manifested OS Versions))
> The Idea behind, as I understand it, is to better support virtualization and
> backward compatibility - you manifest only Windows 8.1 -> than you always get
> a System that behaves like Windows 8.1 in every aspect. (Every Aspect not
> true in some corner cases due to security patches)
Well, it clearly does *NOT* behave as a Windows 8.1, even if for some reason
large pages relies on security patches.
Their API is entirely useless, so I'm still on the opinion that we should
unconditionally use the FILE_MAP_LARGE_PAGES flag if it's defined and call it a
day.
From | Date | Subject | |
---|---|---|---|
Next Message | Zhao Rui | 2022-04-26 07:16:13 | Fix primary crash continually with invalid checkpoint after promote |
Previous Message | David G. Johnston | 2022-04-25 22:13:06 | Re: BUG #17468: Ranking of search results: ts_rank_cd with normalization variant 4 |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2022-04-26 05:13:31 | Re: pgsql: Add contrib/pg_walinspect. |
Previous Message | Nathan Bossart | 2022-04-26 04:46:55 | Re: [Proposal] vacuumdb --schema only |