Re: Align large shared memory allocations
От | Tom Lane |
---|---|
Тема | Re: Align large shared memory allocations |
Дата | |
Msg-id | 29494.1064094926@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Align large shared memory allocations (Manfred Spraul <manfred@colorfullife.com>) |
Ответы |
Re: Align large shared memory allocations
|
Список | pgsql-patches |
Manfred Spraul <manfred@colorfullife.com> writes: > Attached is a patch that aligns large shared memory allocations beyond > MAXIMUM_ALIGNOF. The reason for this is that Intel's cpus have a fast > path for bulk memory copies that only works with aligned addresses. This patch is missing a demonstration that it's actually worth anything. What kind of performance gain do you get? > One problem is the "32" - it's arbitrary, it probably belongs into an > arch dependant header file. But where? We don't really have arch-dependent header files. What I'd be inclined to do is "#define ALIGNOF_BUFFER 32" in pg_config_manual.h, then #define BUFFERALIGN(LEN) to parallel the other TYPEALIGN macros in c.h, and finally use that in the ShmemAlloc code. regards, tom lane
В списке pgsql-patches по дате отправления: