1 |
On Tue, Oct 10, 2006 at 03:20:55AM -0700, Zac Medico wrote: |
2 |
> Brian Harring wrote: |
3 |
> > I might be daft (likely), but why not just introduce a var indicating |
4 |
> > max parallelization instead? Tweak portage to push that setting into |
5 |
> > MAKEOPTS="${MAKEOPTS+${MAKEOPTS} } -j${PARALLELIZATION}". |
6 |
> |
7 |
> The idea sounds good, but I'm not clear on all the details. It |
8 |
> seems like there are several distinct parts: |
9 |
> |
10 |
> 1) Ebuild maintainter sets a metadata variable to indicate the level |
11 |
> of parallelization possible in a build. |
12 |
|
13 |
RESTRICT moreso indicating if it's parallelizable or not. |
14 |
|
15 |
> 2) Gentoo user sets a configuration option indicating the maximum |
16 |
> level of parallelization spread across multiple builds at a given time. |
17 |
|
18 |
|
19 |
> 3) Package manager uses the user's config to allocate an appropriate |
20 |
> PARALLELIZATION at build time, based on 1 and 2 above. Then the |
21 |
> src_compile() function of the ebuild translates PARALLELIZATION into |
22 |
> the appropriate build system flags (possibly with the help of an |
23 |
> eclass function). |
24 |
|
25 |
Not necessarily src_compile, but close enough; the details of how |
26 |
MAX_PARALLELIZATION gets shoved in is semi package specific, although |
27 |
it's kind of implicit at this point that -j# for MAKEOPTS would likely |
28 |
be directly fooled with. |
29 |
|
30 |
For other build systems, rely on eclasses handling it; for MAKEOPTS, |
31 |
would be preferable to do the same imo, but that's not an easy |
32 |
transition. |
33 |
|
34 |
Mind you since there isn't a way to adjust the allowed slices |
35 |
(essentially) while a compile is underway, this won't hit 100% |
36 |
utilization- further, src_install still abides by MAKEOPTS, but it's |
37 |
not like -jN is going to help much there. |
38 |
|
39 |
That said, it's better then the current crapshoot required for trying |
40 |
to do parallel builds; either you have to monkey patch make.conf |
41 |
everytime, or try env overrides for it, both of which aren't |
42 |
incredibly friendly/simple if you're just trying to do an upgrade that |
43 |
abuses your duo/quad. |
44 |
~harring |