bug-make
[Top][All Lists]
Advanced

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

Re: [PATCH] src/main.c: Add -J to detect number of job slots based on np


From: Henrik Carlqvist
Subject: Re: [PATCH] src/main.c: Add -J to detect number of job slots based on nproc.
Date: Fri, 12 Apr 2024 07:58:28 +0200

On Fri, 12 Apr 2024 02:13:36 +0100
Matt Staveley-Taylor <matt.stav.taylor@gmail.com> wrote:
> Browsing the mailing list I can see that the behaviour of -j with no
> arguments has been discussed a few times. Given it would affect
> backwards compatability to change how -j works, introducing a new
> flag seems appropriate.

Yes, it has been discussed. I would not mind if the default without argument
for -j would be to limit to nproc or nproc+1, instead of like now, creating a
fork bomb when compiling a big project.

Slightly related to this is also a patch contributed by me at
https://savannah.gnu.org/bugs/index.php?51200 which makes it possible to
adjust the number of jobs of an existing make process with SIGUSR2 and SIGUSR1
signals. As it does not seem to have been much interest in those patches I
have instead created a fork of gnu make at
https://github.com/henca/Henriks-make where I have done some continued work.
In the latest version I have limited the default number of processes to 3, but
nproc or nproc+1 would have been a better choice.

I will wait and see how your patch is received. If it gets accepted, I will
simply pull from upstream to my repo at next release. Regardless of if it gets
accepted I might inspired by your code limit the default number of jobs to
nproc instead of now 3 in my fork.

regards Henrik



reply via email to

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