Hugetables question

Поиск
Список
Период
Сортировка
От Radosław Smogura
Тема Hugetables question
Дата
Msg-id 201106191156.15487.rsmogura@softperience.eu
обсуждение исходный текст
Ответы Re: Hugetables question  (Martijn van Oosterhout <kleptog@svana.org>)
Re: Hugetables question  (Marti Raudsepp <marti@juffo.org>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Florian Pflug
Дата:
Сообщение: Re: Range Types and extensions
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Hugetables question