Hugetables question

From: Radosław Smogura <rsmogura(at)softperience(dot)eu>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Hugetables question
Date: 2011-06-19 09:56:15
Message-ID: 201106191156.15487.rsmogura@softperience.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I want to implement hugepages for shared memory, to make it transparent I want
to do in this fashion:
1. Reserve memory M of size s
2. Try to allocate hugepage memory of as big size as possible (hs), attach at
M.
3. Allocate normal shared memory of size hs - s, and attach it at M+hs.
This soulution should work for Linux and Windows, and make no difference for
usage of such shared memory in application.

(...and this actually works)

But in sysv_shmem i saw some checking for memory belonging to other (probably
failed) processes, because I can't put new header in step 3, i would like to
ask if will be suefficient to:
1. Check creator pid by shmctl.
2. Remove checking of shmem magic
3. Or maybe instead of this better will be to split shared memory, header will
be stored under one key and it will contain keys to other individually
allocated blocks?

Ofocourse moving to POSIX may be much more better, but according to commit
feast thread it may be impossible.

Maybe some other ideas.

Regards,
Radek

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2011-06-19 10:24:37 Re: Range Types and extensions
Previous Message Florian Pflug 2011-06-19 09:21:28 Re: Range Types and extensions