[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using GNU make jobserver from GCC
From: |
Jan Hubicka |
Subject: |
Re: Using GNU make jobserver from GCC |
Date: |
Mon, 19 May 2014 08:16:50 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> 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.
Most Makefiles will just quit if GCC fails, but I guess we want to have this
implemented correctly. This is why I would preffer to separate the code into
a small library rather than trying to get across all details independelty
of the GNU make implementation.
I looked at the GNU make implementation very briefly couple months back
and it indeed was not very stand alone, but it should not be that much work,
right?
>
> > Yeah, do we have some options except for named pipes on hosts where named
> > pipes
> > are supported?
>
> Sorry, I don't understand the question.
I think the "+" requirement to connect to jobserver is really a problem here;
while this is documented in GCC manual, most users don't get it right and it
requires
more changes to makes than really needed. So if we can't find another
alternative,
I think it would make sense to go for named pipes in tmp directory. What do you
think?
Thanks a lot quick reaction!
Honza
- Using GNU make jobserver from GCC, Jan Hubicka, 2014/05/19
- Re: Using GNU make jobserver from GCC, Eli Zaretskii, 2014/05/19
- Re: Using GNU make jobserver from GCC, Paul Smith, 2014/05/19
- Re: Using GNU make jobserver from GCC, Eli Zaretskii, 2014/05/19
- Re: Using GNU make jobserver from GCC, Paul Smith, 2014/05/19
- Re: Using GNU make jobserver from GCC, Eli Zaretskii, 2014/05/19
- Re: Using GNU make jobserver from GCC, Jan Hubicka, 2014/05/19