Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment
Дата
Msg-id CAFBsxsEVjopQk+rZhsBqftgBxSQs31iHvmMETFC7_gDWeXYTxQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers

On Tue, Nov 8, 2022 at 8:57 AM David Rowley <dgrowleyml@gmail.com> wrote:
> Is there anything we could align to CPU cacheline size that would
> speed something up?

InitCatCache() already has this, which could benefit from simpler notation.

/*
 * Allocate a new cache structure, aligning to a cacheline boundary
 *
 * Note: we rely on zeroing to initialize all the dlist headers correctly
 */
sz = sizeof(CatCache) + PG_CACHE_LINE_SIZE;
cp = (CatCache *) CACHELINEALIGN(palloc0(sz));

--
John Naylor
EDB: http://www.enterprisedb.com

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Suppressing useless wakeups in walreceiver