Re: Misaligned BufferDescriptors causing major performance problems on AMD

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Misaligned BufferDescriptors causing major performance problems on AMD
Дата
Msg-id 4728.1422470331@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Misaligned BufferDescriptors causing major performance problems on AMD  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Misaligned BufferDescriptors causing major performance problems on AMD  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
>> I personally still think that a comment above sbufdesc's definition
>> would be sufficient for now. But whatever. I'll enforce 64byte padding
>> on 64bit platforms, and do nothing on 32bit platforms.

> Patch doing that attached.

Surely the sizeof() in BufferShmemSize needs to be
sizeof(BufferDescPadded) now?

Also, the macro is unnecessarily unsafe for use in #if tests; why not
something like

#define BUFFERDESC_PADDED_SIZE    (SIZEOF_VOID_P == 8 ? 64 : 32)

Otherwise it looks reasonably sane to me, just in a quick once-over;
I didn't test.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: jsonb, unicode escapes and escaped backslashes
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Misaligned BufferDescriptors causing major performance problems on AMD