Re: [HACKERS] patch: add MAP_HUGETLB to mmap() where supported (WIP)

2013-09-17 Thread Robert Haas
On Mon, Sep 16, 2013 at 9:13 AM, Heikki Linnakangas wrote: > Robert, do you remember why you put the "pagesize = sysconf(_SC_PAGE_SIZE);" > call in the new mmap() shared memory allocator? Hmm, no. Unfortunately, I don't. We could try ripping it out and see if the buildfarm breaks. If it is need

Re: [HACKERS] patch: add MAP_HUGETLB to mmap() where supported (WIP)

2013-09-16 Thread Andres Freund
On 2013-09-16 15:18:50 +0200, Andres Freund wrote: > > So even a tiny allocation, much smaller than any page size, succeeds, and it > > reserves a huge page. I tried the same with larger values; the kernel always > > uses huge pages, and rounds up the allocation to a multiple of the huge page > > s

Re: [HACKERS] patch: add MAP_HUGETLB to mmap() where supported (WIP)

2013-09-16 Thread Andres Freund
On 2013-09-16 16:13:57 +0300, Heikki Linnakangas wrote: > On 16.09.2013 13:15, Andres Freund wrote: > >On 2013-09-16 11:15:28 +0300, Heikki Linnakangas wrote: > >>On 14.09.2013 02:41, Richard Poole wrote: > >>>The attached patch adds the MAP_HUGETLB flag to mmap() for shared memory > >>>on systems

Re: [HACKERS] patch: add MAP_HUGETLB to mmap() where supported (WIP)

2013-09-16 Thread Heikki Linnakangas
On 16.09.2013 13:15, Andres Freund wrote: On 2013-09-16 11:15:28 +0300, Heikki Linnakangas wrote: On 14.09.2013 02:41, Richard Poole wrote: The attached patch adds the MAP_HUGETLB flag to mmap() for shared memory on systems that support it. It's based on Christian Kruse's patch from last year,

Re: [HACKERS] patch: add MAP_HUGETLB to mmap() where supported (WIP)

2013-09-16 Thread Andres Freund
On 2013-09-16 11:15:28 +0300, Heikki Linnakangas wrote: > On 14.09.2013 02:41, Richard Poole wrote: > >The attached patch adds the MAP_HUGETLB flag to mmap() for shared memory > >on systems that support it. It's based on Christian Kruse's patch from > >last year, incorporating suggestions from Andr

Re: [HACKERS] patch: add MAP_HUGETLB to mmap() where supported (WIP)

2013-09-16 Thread Heikki Linnakangas
On 14.09.2013 02:41, Richard Poole wrote: The attached patch adds the MAP_HUGETLB flag to mmap() for shared memory on systems that support it. It's based on Christian Kruse's patch from last year, incorporating suggestions from Andres Freund. I don't understand the logic in figuring out the pag

Re: [HACKERS] patch: add MAP_HUGETLB to mmap() where supported (WIP)

2013-09-14 Thread Peter Eisentraut
On Sat, 2013-09-14 at 00:41 +0100, Richard Poole wrote: > The attached patch adds the MAP_HUGETLB flag to mmap() for shared > memory on systems that support it. Please fix the tabs in the SGML files. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to you

[HACKERS] patch: add MAP_HUGETLB to mmap() where supported (WIP)

2013-09-13 Thread Richard Poole
The attached patch adds the MAP_HUGETLB flag to mmap() for shared memory on systems that support it. It's based on Christian Kruse's patch from last year, incorporating suggestions from Andres Freund. On a system with 4GB shared_buffers, doing pgbench runs long enough for each backend to touch mos