Re: Enabling Checksums

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Enabling Checksums
Дата
Msg-id CA+U5nMJ-Oiqmtvb-+JA3ix91tdbGSaYn9VsvBXSjX+9hRA4PwQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Enabling Checksums  (Ants Aasma <ants@cybertec.at>)
Ответы Re: Enabling Checksums  (Ants Aasma <ants@cybertec.at>)
Список pgsql-hackers
On 9 April 2013 03:35, Ants Aasma <ants@cybertec.at> wrote:
> On Fri, Apr 5, 2013 at 9:39 PM, Ants Aasma <ants@cybertec.at> wrote:
>> Unless somebody tells me not to waste my time I'll go ahead and come
>> up with a workable patch by Monday.
>
> And here you go. I decided to be verbose with the comments as it's
> easier to delete a comment to write one. I also left in a huge jumble
> of macros to calculate the contents of a helper var during compile
> time. This can easily be replaced with the calculated values once we
> settle on specific parameters.
>
> Currently only x86-64 is implemented. 32bit x86 would be mostly a
> copy-and-paste job, replacing 64bit pointer registers with 32bit ones.
> For other platforms the simplest way would be to use a vectorizing
> compiler on the generic variant. -funroll-loops -ftree-vectorize is
> enough on gcc.
>
> Quick bench results on the worst case workload:
> master no checksums: tps = 15.561848
> master with checksums: tps = 1.695450
> simd checksums: tps = 14.602698

Numbers look very good on this. Well done.

I support the direction of this, but I don't think I'm sufficiently
well qualified to verify that the code does what it should and/or fix
it if it breaks. If others want to see this happen you'll need to
pitch in.

My only review comments are to ask for some explanation of the magic numbers...
#define CSUM_PRIME1 0x49
#define CSUM_PRIME2 0x986b
#define CSUM_TRUNC 65521

Where magic means a level of technology far above my own
understanding, and yet no (or not enough) code comments to assist me.

--Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: COPY and Volatile default expressions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: COPY and Volatile default expressions