Re: Re: [HACKERS] Patch für MAP_HUGETLB for mmap()shared memory - Mailing list pgsql-hackers

From Christian Kruse
Subject Re: Re: [HACKERS] Patch für MAP_HUGETLB for mmap()shared memory
Date
Msg-id 2485465.PgPQjpVfpN@achilles.local.defunct.ch
Whole thread Raw
In response to Re: Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Hey,

On Tuesday 30 October 2012 20:33:18 Andres Freund wrote:
> +#ifdef MAP_HUGETLB
> +#  ifdef __ia64__
> +#    define PG_HUGETLB_BASE_ADDR (void *)(0x8000000000000000UL)
> +#    define PG_MAP_HUGETLB (MAP_HUGETLB|MAP_FIXED)
> +#  else
>
> Not your fault, but that looks rather strange to me. The level of
> documentation around the requirement of using MAP_FIXED is subpar...

Ok, after further reading I think with MAP_FIXED one has to „generate“ SHM
segment addresses hisself. So 0x8000000000000000UL would just be one possible
location for a hugepage.

Since this feature is not used in PG for now, the code should work. Could
someone with access to a ia64 architecture verify it?

Greetings,
 CK




pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL
Next
From: Alvaro Herrera
Date:
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL