summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-12-11 16:16:29 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-11 11:06:22 +0000
commitf181928937d996b90b45b8b210c0f9859dc1e947 (patch)
tree3e7c18259f77c6860ce77993f5443fd7cc9e5088 /bitbake
parent7448f9a180e46ee404b05f50437b55c79bc601e5 (diff)
downloadpoky-f181928937d996b90b45b8b210c0f9859dc1e947.tar.gz
bitbake: runqueue: Batch scenequeue updates
Batch all updates to scenequeue data together in a single invocation instead of checking each task serially. This allows the checks for sstate object to happen in parallel, and also makes sure the log statement only happens once (per set of rehashes). (Bitbake rev: a7426c73a8e9fae468414a2c32a533d9c3729405) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit db033a8f8a276d864bdb2e1eef159ab5794a0658) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 246a9cdb64..cb499a1cba 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2320,6 +2320,7 @@ class RunQueueExecute:
2320 if tid not in self.pending_migrations: 2320 if tid not in self.pending_migrations:
2321 self.pending_migrations.add(tid) 2321 self.pending_migrations.add(tid)
2322 2322
2323 update_tasks = []
2323 for tid in self.pending_migrations.copy(): 2324 for tid in self.pending_migrations.copy():
2324 if tid in self.runq_running or tid in self.sq_live: 2325 if tid in self.runq_running or tid in self.sq_live:
2325 # Too late, task already running, not much we can do now 2326 # Too late, task already running, not much we can do now
@@ -2379,11 +2380,13 @@ class RunQueueExecute:
2379 if tid in self.build_stamps: 2380 if tid in self.build_stamps:
2380 del self.build_stamps[tid] 2381 del self.build_stamps[tid]
2381 2382
2382 origvalid = False 2383 update_tasks.append((tid, harddepfail, tid in self.sqdata.valid))
2383 if tid in self.sqdata.valid: 2384
2384 origvalid = True 2385 if update_tasks:
2385 self.sqdone = False 2386 self.sqdone = False
2386 update_scenequeue_data([tid], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False) 2387 update_scenequeue_data([t[0] for t in update_tasks], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
2388
2389 for (tid, harddepfail, origvalid) in update_tasks:
2387 if tid in self.sqdata.valid and not origvalid: 2390 if tid in self.sqdata.valid and not origvalid:
2388 logger.info("Setscene task %s became valid" % tid) 2391 logger.info("Setscene task %s became valid" % tid)
2389 if harddepfail: 2392 if harddepfail: