Re: [HACKERS] mmap and MAP_ANON

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] mmap and MAP_ANON
Дата
Msg-id 199805131547.LAA15821@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] mmap and MAP_ANON  ("Göran Thyni" <goran@bildbasen.se>)
Список pgsql-hackers
> *But*,
> (I was thinking about this,)
> we should IMHO take a step backwards to get a better view
> over the whole memory subsystem.
> - Why and for what is shared memory used in the first place?
> - Could we use mmap:ing of files at a higher level then
>   src/backend/strorage/ipc/ipc.c to get even better performance
>   and cleaness?

Yes, we could use mmap() to map the actual files.  I will post time
timings on this soon.

The shared memory acts as a cache for us, that can be locked and not
read in/out of the address space for each sharing, like it does when we
use the OS buffer cache.

>
> I will, time permitting, look into cleaning up the shmem-init/exit
> routines
> to work in a "no-exec" environment. I also has a hack to use
> mmap-shared/private,
> which of course is untested, since it does not work on my linux-boxen.
>
>     regards,
> --
> ---------------------------------------------
> G�ran Thyni, sysadm, JMS Bildbasen, Kiruna
>


--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

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

Предыдущее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] core dump during initdb
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] One problem with Postgres...\