Skip to contentSkip to conversation

perf: disable parallelism for 'make clean'

PATCH Applied Rasmus Villemoes 4 participants 5 messages Jul 5, 2018 – Aug 23, 2018 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: disable parallelism for 'make clean'

The Yocto build system does a 'make clean' when rebuilding due to changed dependencies, and that consistently fails for me (causing the whole BSP build to fail) with errors such as

| find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory
| find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory
| find: find: '[...]/perf/1.0-r9/perf-1.0/libtraceevent.a''[...]/perf/1.0-r9/perf-1.0/libtraceevent.a': No such file or directory: No such file or directory
|

[...]
| find: cannot delete '/mnt/xfs/devel/pil/yocto/tmp-glibc/work/wandboard-oe-linux-gnueabi/perf/1.0-r9/perf-1.0/util/.pstack.o.cmd': No such file or directory

Apparently (despite the comment), 'make clean' ends up launching multiple sub-makes that all want to remove the same things - perhaps this only happens in combination with a O=... parameter. In any case, we don't lose much by explicitly disabling the parallelism for the clean target, and it makes automated builds much more reliable.

---
Another option is to add -ignore_readdir_race to all find commands, but that's a lot more invasive and only works properly together with -delete with a very recent GNU find
(https://savannah.gnu.org/bugs/?52981).

 tools/perf/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/Makefile +2 -2
index 225454416ed5..7902a5681fc8 100644
@@ -84,10 +84,10 @@ endif # has_clean
 endif # MAKECMDGOALS
 
 #
-# The clean target is not really parallel, don't print the jobs info:
+# Explicitly disable parallelism for the clean target.
 #
 clean:
-	$(make)
+	$(make) -j1
 
 #
 # The build-test target is not really parallel, don't print the jobs info,
Signature · 1 line
2.16.4
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Rasmus Villemoes

The Yocto build system does a 'make clean' when rebuilding due to changed dependencies, and that consistently fails for me (causing the whole BSP build to fail) with errors such as

| find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory
| find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory
| find: find: '[...]/perf/1.0-r9/perf-1.0/libtraceevent.a''[...]/perf/1.0-r9/perf-1.0/libtraceevent.a': No such file or directory: No such file or directory
|

[...]
| find: cannot delete '/mnt/xfs/devel/pil/yocto/tmp-glibc/work/wandboard-oe-linux-gnueabi/perf/1.0-r9/perf-1.0/util/.pstack.o.cmd': No such file or directory

Quoted 7 lines

Apparently (despite the comment), 'make clean' ends up launching multiple sub-makes that all want to remove the same things - perhaps this only happens in combination with a O=... parameter. In any case, we don't lose much by explicitly disabling the parallelism for the clean target, and it makes automated builds much more reliable.

thanks,
jirka

#2 lore raw
Quoted 9 lines · Jiri Olsa
Quoted 5 lines · Rasmus Villemoes

this only happens in combination with a O=... parameter. In any case, we don't lose much by explicitly disabling the parallelism for the clean target, and it makes automated builds much more reliable.

Was this picked up by anyone? I'm not seeing it in -next?

Rasmus

maintainer Applied
#3 lore raw

Em Wed, Aug 15, 2018 at 09:30:39AM +0200, Rasmus Villemoes escreveu:

Quoted 7 lines · Jiri Olsa
Quoted 6 lines · Rasmus Villemoes
Quoted 5 lines

this only happens in combination with a O=... parameter. In any case, we don't lose much by explicitly disabling the parallelism for the clean target, and it makes automated builds much more reliable.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Was this picked up by anyone? I'm not seeing it in -next?

Thanks, applied.

- Arnaldo

#4 lore raw

[tip:perf/urgent] perf tools: Disable parallelism for 'make clean'

In reply to Rasmus Villemoes
perf tools: Disable parallelism for 'make clean'
Commit-ID:  da15fc2fa9c07b23db8f5e479bd8a9f0d741ca07
Gitweb:     https://git.kernel.org/tip/da15fc2fa9c07b23db8f5e479bd8a9f0d741ca07
Author:     Rasmus Villemoes <[email protected]>
AuthorDate: Thu, 5 Jul 2018 15:15:27 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 20 Aug 2018 08:54:58 -0300

perf tools: Disable parallelism for 'make clean'

The Yocto build system does a 'make clean' when rebuilding due to changed dependencies, and that consistently fails for me (causing the whole BSP build to fail) with errors such as

| find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory
| find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory
| find: find: '[...]/perf/1.0-r9/perf-1.0/libtraceevent.a''[...]/perf/1.0-r9/perf-1.0/libtraceevent.a': No such file or directory: No such file or directory
|

[...]
| find: cannot delete '/mnt/xfs/devel/pil/yocto/tmp-glibc/work/wandboard-oe-linux-gnueabi/perf/1.0-r9/perf-1.0/util/.pstack.o.cmd': No such file or directory

Apparently (despite the comment), 'make clean' ends up launching multiple sub-makes that all want to remove the same things - perhaps this only happens in combination with a O=... parameter. In any case, we don't lose much by explicitly disabling the parallelism for the clean target, and it makes automated builds much more reliable.

---
 tools/perf/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/Makefile +2 -2
index 225454416ed5..7902a5681fc8 100644
@@ -84,10 +84,10 @@ endif # has_clean
 endif # MAKECMDGOALS
 
 #
-# The clean target is not really parallel, don't print the jobs info:
+# Explicitly disable parallelism for the clean target.
 #
 clean:
-	$(make)
+	$(make) -j1
 
 #
 # The build-test target is not really parallel, don't print the jobs info,