| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Greg Stark <stark(at)mit(dot)edu>, Peter Geoghegan <pg(at)heroku(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Misaligned BufferDescriptors causing major performance problems on AMD |
| Date: | 2015-01-28 18:38:51 |
| Message-ID: | 4728.1422470331@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Andres Freund <andres(at)2ndquadrant(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2015-01-28 18:47:15 | Re: Misaligned BufferDescriptors causing major performance problems on AMD |
| Previous Message | Tom Lane | 2015-01-28 18:30:16 | Re: jsonb, unicode escapes and escaped backslashes |