[m-dev.] thread.spawn_native
Peter Wang
novalazy at gmail.com
Tue Jun 17 17:59:17 AEST 2014
On Sat, 14 Jun 2014 00:20:29 +1000, Paul Bone <paul at bone.id.au> wrote:
> On Fri, Jun 13, 2014 at 02:20:18PM +1000, Peter Wang wrote:
> >
> > I don't really understand the objection to multiple kinds of engine.
> > The work-stealing engines are supposed to be CPU-bound so you get
> > (almost) full CPU utilisation already. Any more engines you add would
> > be, preferably, IO-bound.
>
> What happens when a non-work stealing engine executes a parallel
> conjunction?
Work-stealing engines should be allowed to steal from non-work stealing
engines, once we have the foreign proc attribute.
> That conjunction executes sequentially unless you allow the
> other engines to steal from it (and that's the hard part). Getting it to
> steal from the others is easy.
Unless I'm overlooking something (quite possible) it's not really hard.
The only part of a spark deque which is included bodily in the engine
structure is the outer wrapper. If we allocate that separately as well,
then when the engine is destroyed we can just drop the reference to the
spark deque.
A thief may see the spark deque and try to steal from it while the
engine is being destroyed or already destroyed. That's fine, the spark
deque must be empty anyway.
Or did you have another problem in mind?
I should have a patch ready tomorrow.
Peter
More information about the developers
mailing list