diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2019-12-11 16:16:29 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-12 13:15:00 +0000 |
commit | b3771bded2f288578fe06ef9a2886c713d065c78 (patch) | |
tree | d12d061668a2d23c33ddfeffa18bbd075059d5dc /bitbake/lib | |
parent | c59afbae724409faacfc2ab0f0fd2ab231a065bd (diff) | |
download | poky-b3771bded2f288578fe06ef9a2886c713d065c78.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: db033a8f8a276d864bdb2e1eef159ab5794a0658)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 11 |
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: |