Re: remap the .text segment into huge pages at run time

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: remap the .text segment into huge pages at run time
Дата
Msg-id CAFBsxsESbu57taiRrK5NijATXeDG2woOH7bpK5o1K4GsO9MS4A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: remap the .text segment into huge pages at run time  (John Naylor <john.naylor@enterprisedb.com>)
Ответы Re: remap the .text segment into huge pages at run time  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers

On Wed, Jun 14, 2023 at 12:40 PM John Naylor <john.naylor@enterprisedb.com> wrote:
>
> On Sat, Nov 5, 2022 at 3:27 PM Andres Freund <andres@anarazel.de> wrote:

> > A real version would have to open /proc/self/maps and do this for at least
> > postgres' r-xp mapping. We could do it for libraries too, if they're suitably
> > aligned (both in memory and on-disk).

> For the postmaster, it should be simple to have a function that just takes the address of itself, then parses /proc/self/maps to find the boundaries within which it lies. I haven't thought about libraries much. Though with just the postmaster it seems that would give us the biggest bang for the buck?

Here's a start at that, trying with postmaster only. Unfortunately, I get "MADV_COLLAPSE failed: Invalid argument". I tried different addresses with no luck, and also got the same result with a small standalone program. I'm on ext4, so I gather I don't need "cp --reflink=never" but tried it anyway. Configuration looks normal by "grep HUGEPAGE /boot/config-$(uname -r)".  Maybe there's something obvious I'm missing?

--
John Naylor
EDB: http://www.enterprisedb.com
Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: run pgindent on a regular basis / scripted manner
Следующее
От: Peter Smith
Дата:
Сообщение: Re: [DOC] Update ALTER SUBSCRIPTION documentation v3