diff mbox series

meson compile: Improve compile times

Message ID 20210122170529.672048-1-ohilyard@iol.unh.edu (mailing list archive)
State Accepted
Headers show
Series meson compile: Improve compile times | expand

Commit Message

Owen Hilyard Jan. 22, 2021, 5:05 p.m. UTC
From: Owen Hilyard <ohilyard@iol.unh.edu>

Increased compile timeout
Removed workers parameter from ninja compilation command

After a review of CI metrics, we noticed that dts runtimes had increased
greatly over the last few months. A review of recent logs showed
timeouts for compiling dpdk. Upon review, we discovered that, if the
"dut_cores" parameter is not set in conf/crbs.cfg, then dts uses the
default value, which is a single core, as the core list. The number of cores
in this list was then used the number of workers for ninja. This causes DTS
to attempt to compile DPDK serially, resulting in greatly increased compile
times. The IOL's development machine saw a 30x compile speed increase from
the included changes.

Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
---
 framework/project_dpdk.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tu, Lijuan Feb. 2, 2021, 5:27 a.m. UTC | #1
> Increased compile timeout
> Removed workers parameter from ninja compilation command
> 
> After a review of CI metrics, we noticed that dts runtimes had increased greatly
> over the last few months. A review of recent logs showed timeouts for
> compiling dpdk. Upon review, we discovered that, if the "dut_cores" parameter
> is not set in conf/crbs.cfg, then dts uses the default value, which is a single core,
> as the core list. The number of cores in this list was then used the number of
> workers for ninja. This causes DTS to attempt to compile DPDK serially, resulting
> in greatly increased compile times. The IOL's development machine saw a 30x
> compile speed increase from the included changes.
> 
> Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>

Applied, thanks
diff mbox series

Patch

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index 915c648f..af542a91 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -281,7 +281,7 @@  class DPDKdut(Dut):
         """
         Build DPDK source code on linux use meson
         """
-        build_time = 900
+        build_time = 1200
         target_info = target.split('-')
         arch = target_info[0]
         machine = target_info[1]
@@ -315,7 +315,7 @@  class DPDKdut(Dut):
                         toolchain, extra_options, options_config, default_library, target), "# ", build_time)
         assert ("FAILED" not in out), "meson setup failed ..."
 
-        out = self.send_expect("ninja -C %s -j %d" % (target, self.number_of_cores), "# ", build_time)
+        out = self.send_expect("ninja -C %s" % target, "# ", build_time)
         assert ("FAILED" not in out), "ninja complie failed ...\r\n %s" % out
 
         # copy kmod file to the folder same as make