Re: spinlock contention

From: Florian Pflug <fgp(at)phlo(dot)org>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: spinlock contention
Date: 2011-07-08 20:40:02
Message-ID: 2C8B62FB-9527-4605-9349-B9FBEEA6C88C@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul8, 2011, at 22:27 , Stefan Kaltenbrunner wrote:
> On 07/08/2011 04:21 PM, Tom Lane wrote:
>> Florian Pflug <fgp(at)phlo(dot)org> writes:
>>> Patch attached.
>>
>>> Beware that it needs at least GCC 4.1, otherwise it'll use a per-partition
>>> spin lock instead of "locked xadd" to increment the shared counters.
>>
>> That's already sufficient reason to reject the patch. Not everyone
>> uses gcc, let alone very recent versions of gcc.
>
> hmm - 4.1.0 was released in february 2006, which will be much older than
> even the 5 year support policy we have on pg when 9.2 will be released,
> not sure how much it will matter if we don't support as specific
> optimization on a gcc that old..

Still, it's not really hard to support older Versions, at least on
x86 and x86-64. All it takes is some inline assembly. I just don't
want to put effort into this until we know whether or not the whole
approach is worthwhile or not.

Should someone want to test this patch, but can't because of the GCC
version restriction, please speak up.

best regards,
Florian Pflug

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-07-08 20:55:37 Re: [HACKERS] blog post on ancient history
Previous Message Stefan Kaltenbrunner 2011-07-08 20:27:24 Re: spinlock contention