[m-rev.] for review: Enable thread-local allocation and parallel marking on more platforms.

Paul Bone paul at bone.id.au
Wed Aug 13 09:48:47 AEST 2014


On Tue, Aug 12, 2014 at 05:20:45PM +1000, Julien Fischer wrote:
> On Tue, Aug 12, 2014 at 3:52 PM, Paul Bone <paul at bone.id.au> wrote:
> 
> > On Tue, Aug 12, 2014 at 03:32:46PM +1000, Julien Fischer wrote:
> > >
> > > On Tue, 12 Aug 2014, Julien Fischer wrote:
> > >
> > >> On Tue, 12 Aug 2014, Peter Wang wrote:
> > >>
> > >>> On Tue, 12 Aug 2014 11:19:25 +1000 (EST), Julien Fischer
> > >>> <jfischer at opturion.com> wrote:
> > >>>>
> > >>>> On Tue, 12 Aug 2014, Peter Wang wrote:
> > >>>>
> > >>>>> I intend to apply this on the 14.01 branch.  I think it should be
> > fine,
> > >>>>> but if someone could test it on an SMP OS X machine (e.g. bootcheck
> > in
> > >>>>> hlc.par.gc) then that would be better.
> > >>>>
> > >>>> By "someone", do you mean me?
> > >>>
> > >>> Yes :)
> > >>
> > >> On OS X, I get the following failures when bootchecking in hlc.par.gc
> > >>
> > >>    hard_coded/spawn_native
> > >>    hard_coded/thread_barrier_test
> > >>    hard_coded/tl_backjump_test
> > >>    par_conj/spawn_many
> > >>    par_conj/thread_barrier
> > >>
> > >> All are aborting due to segmentation faults.  I'm not sure if this is
> > >> a result of your patch or if it's happening anyway.   (I'll try again
> > >> without your patch.)
> > >
> > > The above also occur without your patch; I'll look into them separately.
> > >
> >
> > Peter pointed out that there are a number of problems in the RTS in
> > general.
> > I havn't yet found the time to look into these, hopefully soon.  I also
> > want
> > to check all the test cases too.
> 
> 
> Was one such problem the following?
> 
> 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
> MR_THREAD_SAFE
> 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
> around.)

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
all.


-- 
Paul Bone



More information about the reviews mailing list