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

From: Christian Kruse <cjk+postgres(at)defunct(dot)ch>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory
Date: 2012-10-30 22:10:44
Message-ID: 2485465.PgPQjpVfpN@achilles.local.defunct.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-10-30 22:24:20 Re: Proposal for Allow postgresql.conf values to be changed via SQL
Previous Message Alvaro Herrera 2012-10-30 22:10:41 Re: Proposal for Allow postgresql.conf values to be changed via SQL