Re: spinlock contention - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: spinlock contention
Date
Msg-id 7050CB9C-0267-4A4F-AF9D-3AB1A8405ECB@phlo.org
Whole thread Raw
In response to Re: spinlock contention  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Jul8, 2011, at 16:21 , Tom Lane wrote:
> Florian Pflug <fgp@phlo.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.

This is a WIP version meant for testing, not a finish patch!

Spending time on making this work on every conceivable compiler before we
even know whether or not the approach is worthwhile at all seems ludicrous
to me.

A finished version would use inline assembly to avoid the GCC version
dependency, and would support as many additional compilers as there are
people with access to these compilers who offer to help...

But yeah, that will very probably leave some compilers unsupported
(in the "fall back to spin lock per partition sense. Which, if the patch
proves worthwhile at all, probably still provides a benefit over the current
code).

If that is reason enough to reject the patch, i.e. if the policy is "we
don't want it for any if we cannot have it for all", then consider it
withdrawn.

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Kohei KaiGai
Date:
Subject: Re: [v9.2] Fix leaky-view problem, part 1
Next
From: Heikki Linnakangas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Adjust OLDSERXID_MAX_PAGE based on BLCKSZ.