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>
This commit is contained in:
Richard Purdie
2024-05-24 13:50:43 +01:00
parent 6a0a2c4618
commit e9400f091c

View File

@@ -2578,13 +2578,21 @@ class RunQueueExecute:
while next:
current = next.copy()
next = set()
ready = {}
for tid in current:
if self.rqdata.runtaskentries[p].depends and not self.rqdata.runtaskentries[tid].depends.isdisjoint(total):
continue
# get_taskhash for a given tid *must* be called before get_unihash* below
ready[tid] = bb.parse.siggen.get_taskhash(tid, self.rqdata.runtaskentries[tid].depends, self.rqdata.dataCaches)
unihashes = bb.parse.siggen.get_unihashes(ready.keys())
for tid in ready:
orighash = self.rqdata.runtaskentries[tid].hash
newhash = bb.parse.siggen.get_taskhash(tid, self.rqdata.runtaskentries[tid].depends, self.rqdata.dataCaches)
newhash = ready[tid]
origuni = self.rqdata.runtaskentries[tid].unihash
newuni = bb.parse.siggen.get_unihash(tid)
newuni = unihashes[tid]
# FIXME, need to check it can come from sstate at all for determinism?
remapped = False
if newuni == origuni: