mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
bitbake: runqueue: Process unihashes in parallel at init
Improve the runqueue init code to call unihash queries in parallel since this is faster and more efficient, particularly on slower links with longer round trip times. The call to the function from cooker is unneeded since that function calls prepare() and hence this functionality will already have run, so drop that obsolete call. (Bitbake rev: e0486054c7a4c637446c18608e9983cc8dc4d7fe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
parent
fa23d0fc6d
commit
cc341e44bf
|
|
@ -1459,7 +1459,6 @@ class BBCooker:
|
|||
|
||||
if t in task or getAllTaskSignatures:
|
||||
try:
|
||||
rq.rqdata.prepare_task_hash(tid)
|
||||
sig.append([pn, t, rq.rqdata.get_task_unihash(tid)])
|
||||
except KeyError:
|
||||
sig.append(self.getTaskSignatures(target, [t])[0])
|
||||
|
|
|
|||
|
|
@ -1280,11 +1280,18 @@ class RunQueueData:
|
|||
dealtwith = set()
|
||||
todeal = set(self.runtaskentries)
|
||||
while todeal:
|
||||
ready = set()
|
||||
for tid in todeal.copy():
|
||||
if not (self.runtaskentries[tid].depends - dealtwith):
|
||||
dealtwith.add(tid)
|
||||
todeal.remove(tid)
|
||||
self.prepare_task_hash(tid)
|
||||
self.runtaskentries[tid].taskhash_deps = bb.parse.siggen.prep_taskhash(tid, self.runtaskentries[tid].depends, self.dataCaches)
|
||||
# get_taskhash for a given tid *must* be called before get_unihash* below
|
||||
self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(tid, self.runtaskentries[tid].depends, self.dataCaches)
|
||||
ready.add(tid)
|
||||
unihashes = bb.parse.siggen.get_unihashes(ready)
|
||||
for tid in ready:
|
||||
dealtwith.add(tid)
|
||||
todeal.remove(tid)
|
||||
self.runtaskentries[tid].unihash = unihashes[tid]
|
||||
|
||||
bb.event.check_for_interrupts(self.cooker.data)
|
||||
|
||||
|
|
@ -1301,11 +1308,6 @@ class RunQueueData:
|
|||
#self.dump_data()
|
||||
return len(self.runtaskentries)
|
||||
|
||||
def prepare_task_hash(self, tid):
|
||||
self.runtaskentries[tid].taskhash_deps = bb.parse.siggen.prep_taskhash(tid, self.runtaskentries[tid].depends, self.dataCaches)
|
||||
self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(tid, self.runtaskentries[tid].depends, self.dataCaches)
|
||||
self.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(tid)
|
||||
|
||||
def dump_data(self):
|
||||
"""
|
||||
Dump some debug information on the internal data structures
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user