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

2024-04-12 Thread Eli Zaretskii
> Date: Fri, 12 Apr 2024 07:58:28 +0200 > From: Henrik Carlqvist > Cc: bug-make@gnu.org, matt.stav.tay...@gmail.com > > On Fri, 12 Apr 2024 02:13:36 +0100 > Matt Staveley-Taylor wrote: > > Browsing the mailing list I can see that the behaviour of -j with no > > arguments has been discussed a few

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

2024-04-12 Thread DSB
> > Isn't nproc or nproc+1 too much? On systems with hyper-threading, > this will try using too many jobs, and might cause the system be > significantly less responsive. Maybe nproc/2 is a better default? > This is an interesting question and I suppose the answer depends on many factors. At my o

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

2024-04-12 Thread Howard Chu via Bug reports and discussion for GNU make
DSB wrote: > Isn't nproc or nproc+1 too much?  On systems with hyper-threading, > this will try using too many jobs, and might cause the system be > significantly less responsive.  Maybe nproc/2 is a better default? > > > This is an interesting question and I suppose the answer depend

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

2024-04-12 Thread Henrik Carlqvist
> Isn't nproc or nproc+1 too much? On systems with hyper-threading, > this will try using too many jobs, and might cause the system be > significantly less responsive. Maybe nproc/2 is a better default? There have been many other good suggestions of choices for make -j and the choice depends upo

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

2024-04-12 Thread Matt Staveley-Taylor
Add the -J/--detect-job-slots flag as an shorthand equivalent for -j with a value of nproc+2. The help message is deliberately left ambiguous so that we could change it to a different heuristic in future, if desired. The -J flag is *not* passed through to sub-makes in MAKEFLAGS, but instead expand