Re: Misaligned BufferDescriptors causing major performance problems on AMD - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Misaligned BufferDescriptors causing major performance problems on AMD
Date
Msg-id CA+TgmoaejssmRfkEQaVtsFMMAsmgbCV8UDinMRVCi_svbxgAYw@mail.gmail.com
Whole thread Raw
In response to Re: Misaligned BufferDescriptors causing major performance problems on AMD  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Thu, Jan 1, 2015 at 3:04 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>>That's true, but if you don't align the beginnings of the allocations,
>>then it's a lot more complicated for the code to properly align stuff
>>within the allocation.  It's got to insert a variable amount of
>>padding based on the alignment it happens to get.
>
> Hm? Allocate +PG_CACHELINE_SIZE and do var = CACHELINEALIGN(var).

Meh.  I guess that will work, but I see little advantage in it.
Cache-line aligning the allocations is simple and, not of no value, of
long precedent.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: tracking commit timestamps
Next
From: Tom Lane
Date:
Subject: Re: parallel mode and parallel contexts