[m-rev.] for review: support parallel bootcheck using --use-mmc-make
Peter Wang
novalazy at gmail.com
Tue Jul 9 19:58:32 AEST 2019
On Tue, 9 Jul 2019 19:25:24 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> >
> > Maybe -j should be recognised as an mmake option, which then
> > passes -j either to make or mmc --make as appropriate
> > (assuming there is some variable we can pass it through).
>
> That should be possible as well, although I'm not convinced that too
> much effort should be spent supporting mmake --use-mmc-make.
Right.
>
> (As an aside: it would also be nice to integrate mmc --make with
> GNU make's job server mechanism, now that the latter has a documented
> interface.)
>
> On another issue related to this change: did we have a multithreaded
> version of mmc --make somewhere? (I seem to remember someone working on
> one, but I can't remember if it was you or Paul.) The implementation
> that uses separate processes only works on the C backends and isn't
> going to port easily to the non-C backends.
The original implementation used Mercury threads, but that doesn't work
except in .par grades so I made it use processes.
The existing architecture is too complicated because it was originally
designed around threads. If I were doing it today, I would just make the
main process kick off n commands then use waitpid() to wait for any one
of the child processes to finish, then start the next command, and so on.
No shared memory IPC required, so it should port easily to other
platforms. And it should be compatible with .par grades if posix_spawn
is used to run the commands.
Peter
More information about the reviews
mailing list