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>
This commit is contained in:
Richard Purdie 2024-05-24 13:50:43 +01:00 committed by Steve Sakoman
parent cc341e44bf
commit bcb569e698

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: