#471886 libatomic-ops-dev: 32-bit compare-and-swap on 64-bit platforms

Package:
libatomic-ops-dev
Source:
libatomic-ops
Description:
A library for atomic operations (development files)
Submitter:
Adam C Powell IV
Date:
2010-01-25 17:42:11 UTC
Severity:
wishlist
#471886#5
Date:
2008-03-20 20:34:17 UTC
From:
To:
Package: libatomic-ops-dev
Version: 1.2-4
Severity: wishlist

Please add (or request from upstream) 32-bit operations on 64-bit
platforms.  For example, right now AO_HAVE_int_compare_and_swap is only
defined on ia64, not amd64 or any other 64-bit platform.

I think this should be possible to do in a non-arch-dependent header as
follows:
      * Block the 64-bit aligned address of the 32-bit object
      * Load, compare, and swap just the 32-bit portion in question
        (using 32-bit fields in standard_ao_double_t.h)
      * Unblock the 64-bit aligned address
The only thing this approach would lose is the ability to simultaneously
compare-and-swap two adjacent 32-bit values, but right now that's not
possible anyway.  But it may be less straightforward, and in any case, I
don't know how to do it.

Background: OpenMPI requires 32-bit atomic operations for several
functions.  It implements these in assembly on about half of the
architectures in Debian.  To get it to work, one approach is to use
libatomic-ops-dev instead of upstream assembler.  But that doesn't work
on non-ia64 64-bit architectures for the reason above.

Thank you,
-Adam

#471886#10
Date:
2008-03-21 01:34:58 UTC
From:
To:
Hi,

Upstream recently told me that the canonical source for libatomic-ops
is the Boehm garbage collector, so your request would be appropriate
on their mailing list.

http://www.hpl.hp.com/personal/Hans_Boehm/gc/
gc@linux.hpl.hp.com

Do you mind taking it up there?

Cheers,

#471886#15
Date:
2009-04-04 20:17:39 UTC
From:
To:
Hi,

If I understand correctly, libatomic-ops was found not completly
adequate for openmpi? Was this information passed to libatomic-ops
upstream (which is boehm gc?).

#471886#20
Date:
2009-04-04 20:55:25 UTC
From:
To:
Hi Riku!

Am Samstag, den 04.04.2009, 23:17 +0300 schrieb Riku Voipio:

We passed it to upstream a while ago. There was some preliminary patch
which added some support to it but that was never finished or updated. I
wanted to have a closer look at it once the other bugs are fixed and the
transition is done. But it is currently not very high on my TODO list.

If you can offer some help I would be very happy. Most of the work done
so far should have references in the bug reports and/or the team mailing
list. I can dig that out for you, if you like to. But it will be a few
weeks until I can work on that.

Best regards
Manuel