Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group