summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-05-24 13:50:43 +0100
committerSteve Sakoman <steve@sakoman.com>2024-06-06 06:53:49 -0700
commitbcb569e698d8ce7a81840b3c3373ddf30dcec5c4 (patch)
treee994b0288230d2a44a6b9132b078cb25425a1c09 /bitbake/lib/bb/runqueue.py
parentcc341e44bfbfe4e5dedac8ca6ccd438a50c3db11 (diff)
downloadpoky-bcb569e698d8ce7a81840b3c3373ddf30dcec5c4.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: 682fb42420eebf18f8a98bd3992baf9034dac5ac) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-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: