Summary: | sys-apps/portage: GNU make jobserver integration | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Zac Medico <zmedico> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | bjoern, daniel.santos, dennis.lissov, esigra, flow, jaak, james.al.stevenson, josef64, kingjon3377, maffblaster, mattst88, pacho, sam, syu.os, ulm |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=744103 https://github.com/ninja-build/ninja/issues/1139 https://github.com/NixOS/nixpkgs/pull/143820 https://bugs.gentoo.org/show_bug.cgi?id=822123 https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7000 https://bugs.gentoo.org/show_bug.cgi?id=737098 https://github.com/rui314/mold/issues/117 https://github.com/gentoo/portage/pull/913 https://bugs.gentoo.org/show_bug.cgi?id=336592 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 184128 |
Description
Zac Medico
2019-08-19 21:38:46 UTC
I second this request. This also will help with bugs like #737098. Thank you! +1 clarification: - current emerge may run parallel ebuilds - each ebuild may use GNU make - top-level GNU make of each ebuild may create jobserver - children GNU make(s) may use created jobserver by extended MAKEFLAGS problem: - there can be multiple GNU make jobserver in parallel - these jobservers can overuse given cpu resources goal: - let emerge create a master GNU make jobserver - each parallel ebuild top-level GNU make should ask as client job than unanswered: - no bash-ish jobserver example for easy emerge or prescript integration? - no simple/plain GNU make jobserver command? - sharing pipes between parallel ebuilds possible? sandbox? GNU make procedure: $ cat Makefile all: echo $$MAKEFLAGS $ make -j63 echo $MAKEFLAGS -j63 --jobserver-auth=3,4 (In reply to and from comment #3) > problem: > - there can be multiple GNU make jobserver in parallel > - these jobservers can overuse given cpu resources Note that you can mitigate the over-provision issue already without a central portage-provided jobserver by using make's --load-average option. Multiple parallel emerges will then implicitly communicate over the load overage and restrict their task creation based on it. For example, on a 8 core system, you could set: MAKEOPTS="--jobs 8 --load-average 9" The work in make 4.4 (not yet released) will make this much easier as we don't have to worry about fd inheritance at all: https://github.com/ninja-build/ninja/issues/1139#issuecomment-1223785608. Of course, we still need to implement a basic jobserver, but marxin's example is a solid basis to start on. There's now a PR for this: https://github.com/gentoo/portage/pull/913 from syu! |