On Mon, Nov 11, 2013 at 1:57 PM, Andres Freund <and...@2ndquadrant.com> wrote: > Instead of de-supporting platforms that don't have CAS support or > providing parallel implementations we could relatively easily build a > spinlock based fallback using the already existing requirement for > tas(). > Something like an array of 16 spinlocks, indexed by a more advanced > version of ((char *)(&atomics) >> sizeof(char *)) % 16. The platforms > that would fallback aren't that likely to be used under heavy > concurrency, so the price for that shouldn't be too high. > > The only real problem with that would be that we'd need to remove the > spinnlock fallback for barriers, but that seems to be pretty much > disliked.
I think this is worth considering. I'm not too clear what to do about the barriers problem, though. I feel like we've dug ourselves into a bit of a hole, there, and I'm not sure I understand the issues well enough to dig us back out of it. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers