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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: okano(dot)naoki(at)jp(dot)fujitsu(dot)com, 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-03-26 05:46:45
Message-ID: Yj6oxYsBE5LXA8ZP@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Fri, Mar 25, 2022 at 07:52:57AM +0000, PG Bug reporting form wrote:
> On this page (*) says that in Windows 10, version 1703 and later OS
> versions,
> you must specify the FILE_MAP_LARGE_PAGES flag with the MapViewOfFile
> function
> to map large pages.
>
> I think it seems to be the cause that MapViewOfFile() in
> src/backend/port/win32_shmem.c
> does not specify FILE_MAP_LARGE_PAGES flag.

Hmm. Okay. A patch would be straight-forward, as we could just
assign the optional flag in a separate variable at the beginning of
PGSharedMemoryCreate(), similarly to flProtect when we find out that
large pages can be used, then pass it down to MapViewOfFileEx(). I
don't have a Windows 10 machine as recent as that at hand, though..

Perhaps the CI uses Windows machines that would allow to test and
check that, with some logs magically added to debug things.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Julien Rouhaud 2022-03-26 08:24:08 Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.
Previous Message Bharath Rupireddy 2022-03-26 04:02:43 Re: BUG #17449: Disk space not released

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-03-26 05:52:29 Re: Remove an unused function GetWalRcvWriteRecPtr
Previous Message Bharath Rupireddy 2022-03-26 05:44:43 Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.