summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-05-24 13:50:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-05-28 23:46:21 +0100
commite9400f091c25c028aee753592b372ee6b79ae40f (patch)
treec1c620bb39fc616eb3f43a1b80500f94e039a12a /bitbake
parent6a0a2c4618d75cac140a70b66c58d659bd4785a5 (diff)
downloadpoky-e9400f091c25c028aee753592b372ee6b79ae40f.tar.gz
bitbake: runqueue: Improve rehash get_unihash parallelism
Improve the rehash code to query unihashes in parallel since this is more efficient on slower links. (Bitbake rev: c1949d5350342eaaf6ab988d7bfba99496d55523) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 999868dd72..47f48304ea 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2578,13 +2578,21 @@ class RunQueueExecute:
2578 while next: 2578 while next:
2579 current = next.copy() 2579 current = next.copy()
2580 next = set() 2580 next = set()
2581 ready = {}
2581 for tid in current: 2582 for tid in current:
2582 if self.rqdata.runtaskentries[p].depends and not self.rqdata.runtaskentries[tid].depends.isdisjoint(total): 2583 if self.rqdata.runtaskentries[p].depends and not self.rqdata.runtaskentries[tid].depends.isdisjoint(total):
2583 continue 2584 continue
2585 # get_taskhash for a given tid *must* be called before get_unihash* below
2586 ready[tid] = bb.parse.siggen.get_taskhash(tid, self.rqdata.runtaskentries[tid].depends, self.rqdata.dataCaches)
2587
2588 unihashes = bb.parse.siggen.get_unihashes(ready.keys())
2589
2590 for tid in ready:
2584 orighash = self.rqdata.runtaskentries[tid].hash 2591 orighash = self.rqdata.runtaskentries[tid].hash
2585 newhash = bb.parse.siggen.get_taskhash(tid, self.rqdata.runtaskentries[tid].depends, self.rqdata.dataCaches) 2592 newhash = ready[tid]
2586 origuni = self.rqdata.runtaskentries[tid].unihash 2593 origuni = self.rqdata.runtaskentries[tid].unihash
2587 newuni = bb.parse.siggen.get_unihash(tid) 2594 newuni = unihashes[tid]
2595
2588 # FIXME, need to check it can come from sstate at all for determinism? 2596 # FIXME, need to check it can come from sstate at all for determinism?
2589 remapped = False 2597 remapped = False
2590 if newuni == origuni: 2598 if newuni == origuni: