Re: [HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2013-06-28 Thread Andres Freund
Hi, On 2013-06-28 23:03:22 -0400, Bruce Momjian wrote: > Did we decide against specifying huge pages in Postgres? I don't think so. We need somebody to make some last modifications to the patch though and Christian doesn't seem to have the time atm. I think the bigger memory (size of the per pro

Re: [HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2013-06-28 Thread Bruce Momjian
Did we decide against specifying huge pages in Postgres? --- On Tue, Oct 30, 2012 at 09:16:07PM +0100, Christian Kruse wrote: > Hey, > > ok, I think I implemented all of the changes you requested. All but > the ia64 depende

Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-12-21 Thread Andres Freund
On 2012-10-30 21:16:07 +0100, Christian Kruse wrote: > +static long > +InternalGetHugepageSize() > +{ > + DIR *dir = opendir(HUGE_PAGE_INFO_DIR); > + long smallest_size = -1, size; > + char *ptr; > ... > + while((ent = readdir(dir)) != NULL) > + { This should be (Allocate|Read)

Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-11-13 Thread Andres Freund
Oh, one more thing... On 2012-10-30 21:16:07 +0100, Christian Kruse wrote: > ok, I think I implemented all of the changes you requested. All but > the ia64 dependent, I have to do more research for this one. I vote for simply not caring about ia64. This is: > +#ifdef MAP_HUGETLB > +# ifdef __i

Re: [HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-11-13 Thread Andres Freund
Hi CK, On 2012-10-30 21:16:07 +0100, Christian Kruse wrote: > index b4fcbaf..66ed10f 100644 > --- a/doc/src/sgml/config.sgml > +++ b/doc/src/sgml/config.sgml I think a short introduction or at least a reference on how to configure hugepages would be a good thing. > >temp_buffers (

Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-11-01 Thread Christian Kruse
Hi, On Monday 29 October 2012 16:33:25 Tom Lane wrote: > Christian Kruse writes: > > I created a patch which implements MAP_HUGETLB for sysv shared memory > > segments (PGSharedMemoryCreate). It is based on tests of Tom Lane and > > Andres Freund, I added error handling, huge page size detection

Re: [HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-31 Thread Christian Kruse
Hey, On 30/10/12 20:33, Andres Freund wrote: > +#ifdef MAP_HUGETLB > +# ifdef __ia64__ > +#define PG_HUGETLB_BASE_ADDR (void *)(0x8000UL) > +#define PG_MAP_HUGETLB (MAP_HUGETLB|MAP_FIXED) > +# else > > Not your fault, but that looks rather strange to me. The level of > docum

Re: [HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-30 Thread Christian Kruse
Hey, On Tuesday 30 October 2012 20:33:18 Andres Freund wrote: > +#ifdef MAP_HUGETLB > +# ifdef __ia64__ > +#define PG_HUGETLB_BASE_ADDR (void *)(0x8000UL) > +#define PG_MAP_HUGETLB (MAP_HUGETLB|MAP_FIXED) > +# else > > Not your fault, but that looks rather strange to me. The

Re: [HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-30 Thread Christian Kruse
Hey, ok, I think I implemented all of the changes you requested. All but the ia64 dependent, I have to do more research for this one. Greetings, CK diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index b4fcbaf..66ed10f 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/co

Re: [HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-30 Thread Christian Kruse
Hey, On 30/10/12 20:33, Andres Freund wrote: > +#ifdef MAP_HUGETLB > +# ifdef __ia64__ > +#define PG_HUGETLB_BASE_ADDR (void *)(0x8000UL) > +#define PG_MAP_HUGETLB (MAP_HUGETLB|MAP_FIXED) > +# else > > Not your fault, but that looks rather strange to me. The level of > docum

Re: [HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-30 Thread Andres Freund
On Tuesday, October 30, 2012 08:20:33 PM Christian Kruse wrote: > Hey, > > Oh man, first I didn't sent the email to the list and now I forgot the > attachment. I should really get some sleep, sorry for any > inconveniences :( +#ifdef MAP_HUGETLB +# ifdef __ia64__ +#define PG_HUGETLB_BASE_ADD

Re: [HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-30 Thread Christian Kruse
Hey, Oh man, first I didn't sent the email to the list and now I forgot the attachment. I should really get some sleep, sorry for any inconveniences :( Greetings, CK diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index b4fcbaf..66ed10f 100644 --- a/doc/src/sgml/config.sgml +++

Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-30 Thread Christian Kruse
Hi, On 29/10/12 16:33, Tom Lane wrote: > > I created a patch which implements MAP_HUGETLB for sysv shared memory > > segments > > (PGSharedMemoryCreate). It is based on tests of Tom Lane and Andres Freund, > > I > > added error handling, huge page size detection and a GUC variable. > > My recoll

Re: [HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-30 Thread Christian Kruse
Hi, On 29/10/12 21:14, Peter Geoghegan wrote: > I have a few initial observations on this. Thanks for your feedback. > > * I think you should be making the new GUC PGC_INTERNAL on platforms > where MAP_HUGETLB is not defined or available. See also, > effective_io_concurrency. This gives sane err

[HACKERS] Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-29 Thread Peter Geoghegan
On 29 October 2012 20:14, Christian Kruse wrote: > created a patch which implements MAP_HUGETLB for sysv shared memory segments > (PGSharedMemoryCreate). It is based on tests of Tom Lane and Andres Freund, I > added error handling, huge page size detection and a GUC variable. I have a few initial

Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-29 Thread Andres Freund
On Monday, October 29, 2012 09:33:25 PM Tom Lane wrote: > Christian Kruse writes: > > I created a patch which implements MAP_HUGETLB for sysv shared memory > > segments (PGSharedMemoryCreate). It is based on tests of Tom Lane and > > Andres Freund, I added error handling, huge page size detection

Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-29 Thread Tom Lane
Christian Kruse writes: > I created a patch which implements MAP_HUGETLB for sysv shared memory > segments > (PGSharedMemoryCreate). It is based on tests of Tom Lane and Andres Freund, I > added error handling, huge page size detection and a GUC variable. My recollection is we'd decided not to

[HACKERS] Patch für MAP_HUGETLB for mmap() shared memory

2012-10-29 Thread Christian Kruse
Hey, this is my first post to the -hackers lists, so be merciful ;-) I created a patch which implements MAP_HUGETLB for sysv shared memory segments (PGSharedMemoryCreate). It is based on tests of Tom Lane and Andres Freund, I added error handling, huge page size detection and a GUC variable. P