Re: Supporting huge pages on Windows - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject Re: Supporting huge pages on Windows
Date
Msg-id 0A3221C70F24FB45833433255569204D1F6BFE6F@G01JPEXMBYT05
Whole thread Raw
In response to Re: [HACKERS] Supporting huge pages on Windows  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Andres Freund
> I don't think the errdetail is quite right - OpenProcessToken isn't really
> a syscall, is it? But then it's a common pattern already in wind32_shmem.c...

Yes, "Win32 API function" would be correct, but I followed the existing code...


> > +                 errdetail("Failed system call was %s.",
> > +"LookupPrivilegeValue")));
> 
> Other places in the file actually log the arguments to the function...

The only place is CreateFileMapping.  Other places (DuplicateHandle and MapViewOfFileEx) don't log arguments.  I guess
theoriginal developer thought that size and name arguments to CreateFileMapping() might be useful for troubleshooting.
 


> Wonder if we should quote "Lock Pages in Memory" or add dashes, to make
> sure it's clear that that's the right?

I saw several Microsoft pages, including a page someone introduced me here, and they didn't quote the user right.  I'm
comfortablewith the current code, but I don't mind if the committer adds some quotation.
 


> > +            flProtect = PAGE_READWRITE | SEC_COMMIT |
> SEC_LARGE_PAGES;
> 
> Why don't we just add the relevant flag, instead of overwriting the previous
> contents?

I don't have strong opinion on this...

> Uh - isn't that a behavioural change?  Was this discussed?

Yes, I described this in the first mail.  Magnus asked about this later and I replied.

Regards
Takayuki Tsunakawa




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Letting the client choose the protocol to use during a SASL exchange
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: Statement timeout behavior in extended queries