[PATCH v3] Use CC atomic builtins on ARM
Hello Tom, all,
happy new year everyone!
Tom Lane [2011-12-20 21:14 -0500]:
So I'm thinking that removing the swpb ASM option is not such a good
idea. We could possibly test for __sync_lock_test_and_set first, and
only use swpb if we're on ARM and don't have the builtin.
Tom Lane [2011-12-21 10:55 -0500]:
Yeah, that was another thing I found worrisome while googling: there
were a disturbingly large number of claims that __sync_lock_test_and_set
and/or __sync_lock_release were flat-out broken on various combinations
of gcc version and platform. After reading that, there is no way at all
that I'd accept your original patch to use these functions everywhere.For the moment I'm inclined to consider using these functions *only* on
ARM, so as to limit our exposure to such bugs. That would also limit
the risk of using an inappropriate choice of lock width.
OK, fair enough. New patch attached, which does exactly this now.
Third time is the charm!
Thanks,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
Attachments:
01-armel-tas.patchtext/x-diff; charset=us-asciiDownload+96-2
Import Notes
Reply to msg id not found: 5642.1324482916@sss.pgh.pa.us23930.1324433689@sss.pgh.pa.us
Martin Pitt <mpitt@debian.org> writes:
Tom Lane [2011-12-21 10:55 -0500]:
For the moment I'm inclined to consider using these functions *only* on
ARM, so as to limit our exposure to such bugs. That would also limit
the risk of using an inappropriate choice of lock width.
OK, fair enough. New patch attached, which does exactly this now.
Third time is the charm!
I've got some minor cosmetic complaints about this, but unless anyone's
got something substantive I will fix those, apply and back-patch it.
There are some folks trying to get a Fedora ARM port running and
I think this might help them with Postgres ...
http://arm.koji.fedoraproject.org/koji/getfile?taskID=246852&name=build.log
regards, tom lane