help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using GNU make jobserver from GCC


From: Paul Smith
Subject: Re: Using GNU make jobserver from GCC
Date: Mon, 19 May 2014 01:50:18 -0400

On Mon, 2014-05-19 at 07:09 +0200, Jan Hubicka wrote:
> > http://make.mad-scientist.net/jobserver.html
> > 
> > Of course, another option is to have the waitpid() done in another
> > thread; that would also solve the problem.
> 
> Yeah, I read the article. I assume real world implementation will be slightly 
> trickier,
> since one needs to take care i.e. of cases where GCC crashes or return early, 
> right?

Whatever takes a token out of the jobserver pipe must be certain to put
it back.  It's not valid to crash or return early without putting the
token back.  That's just a guarantee you have to make if you want to
participate.  If you don't then the number of jobs is permanently
reduced.  It will never go to zero, though, because the make program
that invoked GCC takes a token for GCC itself and whenever GCC exits,
for any reason, make will put that token back.  So, the build will
always progress but will lose parallelism if GCC's handling of jobserver
is improperly implemented.

> Yeah, do we have some options except for named pipes on hosts where named 
> pipes
> are supported?

Sorry, I don't understand the question.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]