[m-rev.] for review: Enable thread-local allocation and parallel marking on more platforms.
paul at bone.id.au
Wed Aug 13 14:39:05 AEST 2014
On Wed, Aug 13, 2014 at 02:16:15PM +1000, Julien Fischer wrote:
> On Wed, 13 Aug 2014, Paul Bone wrote:
>>> diff --git a/runtime/mercury_memory_zones.c b/runtime/mercury_memory_zones.c
>>> index 91f9f89..df418b6 100644
>>> --- a/runtime/mercury_memory_zones.c
>>> +++ b/runtime/mercury_memory_zones.c
>>> @@ -514,7 +514,7 @@ MR_next_offset(void)
>>> old_counter = offset_counter;
>>> new_counter = (old_counter + 1) % (CACHE_SLICES - 1);
>>> -#if defined(MR_THREAD_SAFE)
>>> +#if defined(MR_LL_PARALLEL_CONJ)
>>> ** The critical section here is really small, a CAS will work well.
>>> The macros protecting MR_compare_and_swap_int and friends do
>>> not appear to be consistent. The declarations are protected by
>>> but the definitions by MR_LL_PARALLEL_CONJ. (And for reasons that mystify
>>> me at the moment, the whole thing breaks when I attempt to build the runtime
>>> in hlc.par.gc.ll_debug, but not in hlc.par.gc -- that's what the above
>>> patch works
>> I don't remember the specifics off hand. I'd have to check the archives and
>> also review the code. This is why I want to review this code and check it
> One of the things that needs to be done when you do get around to
> reviewing it is to check whether we can use C11's support for atomic
> operations (i.e. the ones defined in stdatomic.h) instead of compiler
> intrinsics or inline asm.
Okay, good idea.
More information about the reviews