buildscript: count available cpus with nproc #74

Closed
jkimmel wants to merge 1 commits from jkimmel/firmware:nproc into master
Owner

Grepping /proc/cpuinfo does not yield the correct number of available
cpus when running in a docker container or setting the number of
available cpus with taskset.

$ taskset 1 grep -c processor /proc/cpuinfo
8
$ taskset 1 nproc
1

This will prevent using too many build jobs on environments where the
number of available cpus is reduced.

nproc is part of coreutils.

Signed-off-by: Johannes Kimmel fff@bareminimum.eu

Grepping `/proc/cpuinfo` does not yield the correct number of available cpus when running in a docker container or setting the number of available cpus with taskset. ``` $ taskset 1 grep -c processor /proc/cpuinfo 8 $ taskset 1 nproc 1 ``` This will prevent using too many build jobs on environments where the number of available cpus is reduced. `nproc` is part of `coreutils`. Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
jkimmel added 1 commit 2021-01-11 08:45:15 +01:00
c78130b15d
buildscript: count available cpus with nproc
Grepping `/proc/cpuinfo` does not yield the correct number of available
cpus when running in a docker container or setting the number of
available cpus with taskset.

```
$ taskset 1 grep -c processor /proc/cpuinfo
8
$ taskset 1 nproc
1
```

This will prevent using too many build jobs on environments where the
number of available cpus is reduced.

`nproc` is part of `coreutils`.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
fbl approved these changes 2021-01-11 11:14:35 +01:00
fbl left a comment
Owner

Reviewed-by: Fabian Bläse <fabian@blaese.de>

`Reviewed-by: Fabian Bläse <fabian@blaese.de>`
fbl added this to the 20210211-beta milestone 2021-01-11 11:14:55 +01:00
jkimmel added the
build/scripts/tools
label 2021-01-11 13:40:15 +01:00
rohammer approved these changes 2021-01-11 15:10:07 +01:00
rohammer left a comment
Member

Reviewed-by: Robert Langhammer rlanghammer@web.de

Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Member

Mal wieder vergessen zu quoten.

Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Mal wieder vergessen zu quoten. ``` Reviewed-by: Robert Langhammer <rlanghammer@web.de> ```
Owner

Danke, wird gleich gemergt.

Danke, wird gleich gemergt.
adschm closed this pull request 2021-01-13 21:45:25 +01:00
Author
Owner
6e5a6073b8549e9de25108dbad6176f319603f5b

Pull request closed

Sign in to join this conversation.
No description provided.