siggen: Drop copy_unihashes function
PATCH 1/2 siggen: Drop copy_unihashes function
The code in OE-Core using this has been replaced with something more fit for purpose. Drop these function calls as they were never a great idea in the first place and cause IO slowdown for runqueue needing to sync the cache.
--- lib/bb/siggen.py | 6 ------ 1 file changed, 6 deletions(-)
lib/bb/siggen.py +0 -6
@@ -201,9 +201,6 @@ class SignatureGenerator(object): def save_unitaskhashes(self): return - def copy_unitaskhashes(self, targetdir): - return - def set_setscene_tasks(self, setscene_tasks): return
@@ -418,9 +415,6 @@ class SignatureGeneratorBasic(SignatureGenerator): def save_unitaskhashes(self): self.unihash_cache.save(self.unitaskhashes) - def copy_unitaskhashes(self, targetdir): - self.unihash_cache.copyfile(targetdir) - def dump_sigtask(self, mcfn, task, stampbase, runtime): tid = mcfn + ":" + task mc = bb.runqueue.mc_from_tid(mcfn)
PATCH 2/2 runqueue: Avoid save_unitaskhashes
The save comes with an IO overhead which can slow down the rehash loop in bitbake a lot. We only needed to do this when recipes were doing unihash cache copying. Now they aren't doing that, drop this IO pain point.
--- lib/bb/runqueue.py | 3 --- 1 file changed, 3 deletions(-)
lib/bb/runqueue.py +0 -3
@@ -2550,9 +2550,6 @@ class RunQueueExecute: self.rqdata.runtaskentries[hashtid].unihash = unihash bb.parse.siggen.set_unihash(hashtid, unihash) toprocess.add(hashtid) - if torehash: - # Need to save after set_unihash above - bb.parse.siggen.save_unitaskhashes() # Work out all tasks which depend upon these total = set()
Hello Richard,
Quoted 24 lines · Richard Purdie
The code in OE-Core using this has been replaced with something more fit for purpose. Drop these function calls as they were never a great idea in the first place and cause IO slowdown for runqueue needing to sync the cache.
Signed-off-by Richard Purdie <[email protected]>--- lib/bb/siggen.py | 6 ------ 1 file changed, 6 deletions(-)lib/bb/siggen.py +0
-3@@ -201,9 +201,6 @@ class SignatureGenerator(object): def save_unitaskhashes(self): return - def copy_unitaskhashes(self, targetdir): - return - def set_setscene_tasks(self, setscene_tasks): return
lib/bb/siggen.py class SignatureGeneratorBasic(SignatureGenerator): · line 423
Quoted 6 lines
lib/bb/siggen.py +0
-3@@ -418,9 +415,6 @@ class SignatureGeneratorBasic(SignatureGenerator): def save_unitaskhashes(self): self.unihash_cache.save(self.unitaskhashes) - def copy_unitaskhashes(self, targetdir): - self.unihash_cache.copyfile(targetdir) -
It breaks sstatetests.SStateBundles.test_minimal_bundle which uses copy_unitaskhashes
Quoted 13 lines
lib/bb/siggen.py +0
-1def dump_sigtask(self, mcfn, task, stampbase, runtime): tid = mcfn + ":" + task mc = bb.runqueue.mc_from_tid(mcfn) -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#16316): https://lists.openembedded.org/g/bitbake-devel/message/16316
Mute This Topic: https://lists.openembedded.org/mt/106483284/3617179
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 33 lines · Alexandre Belloni
Hello Richard,
Quoted 29 lines · Richard Purdie
The code in OE-Core using this has been replaced with something more fit
for purpose. Drop these function calls as they were never a great idea in the
first place and cause IO slowdown for runqueue needing to sync the cache.Signed-off-by Richard Purdie <[email protected]>---
lib/bb/siggen.py | 6 ------1 file changed, 6 deletions(-)lib/bb/siggen.py +0
-0@@ -201,9 +201,6 @@ class SignatureGenerator(object):def
save_unitaskhashes(self):
return
- defcopy_unitaskhashes(self, targetdir):
- return
-
defset_setscene_tasks(self, setscene_tasks):
returnlib/bb/siggen.py +0
-0@@ -418,9 +415,6 @@ classSignatureGeneratorBasic(SignatureGenerator):
defsave_unitaskhashes(self):
Quoted 8 lines
Quoted 5 lines
self.unihash_cache.save(self.unitaskhashes)
- defcopy_unitaskhashes(self, targetdir):
-self.unihash_cache.copyfile(targetdir)-It breaks sstatetests.SStateBundles.test_minimal_bundle which uses
copy_unitaskhashes
Is that patch only in your -next branch? I didn't see this issue in my own testing which makes me wonder...
Cheers,
Richard
I think it’s in my patch set for build replication that needs to be reworked to not use the function and should be dropped until then.
Alex
Quoted 63 lines · Richard Purdie via lists.openembedded.org
Quoted 35 lines · Alexandre Belloni
Hello Richard,
Quoted 31 lines · Richard Purdie
The code in OE-Core using this has been replaced with something more fit
for purpose. Drop these function calls as they were never a great idea in the
first place and cause IO slowdown for runqueue needing to sync the cache.Signed-off-by Richard Purdie <[email protected]>--- lib/bb/siggen.py | 6 ------ 1 file changed, 6 deletions(-)lib/bb/siggen.py +0
-3@@ -201,9 +201,6 @@ class SignatureGenerator(object): def save_unitaskhashes(self): return - def copy_unitaskhashes(self, targetdir): - return - def set_setscene_tasks(self, setscene_tasks): return@@ -418,9 +415,6 @@ classSignatureGeneratorBasic(SignatureGenerator):
defsave_unitaskhashes(self):
self.unihash_cache.save(self.unitaskhashes)Quoted 6 lines
lib/bb/siggen.py class SignatureGeneratorBasic(SignatureGenerator): · line 423
Quoted 3 lines
lib/bb/siggen.py +0
-3- def copy_unitaskhashes(self, targetdir): - self.unihash_cache.copyfile(targetdir) -It breaks sstatetests.SStateBundles.test_minimal_bundle which uses
copy_unitaskhashesIs that patch only in your -next branch? I didn't see this issue in my own testing which makes me wonder...
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#16331):
https://lists.openembedded.org/g/bitbake-devel/message/16331
Mute This Topic: https://lists.openembedded.org/mt/106483284/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 44 lines · Richard Purdie
Quoted 33 lines · Alexandre Belloni
Hello Richard,
Quoted 29 lines · Richard Purdie
The code in OE-Core using this has been replaced with something more fit
for purpose. Drop these function calls as they were never a great idea in the
first place and cause IO slowdown for runqueue needing to sync the cache.Signed-off-by Richard Purdie <[email protected]>---
�lib/bb/siggen.py | 6 ------
�1 file changed, 6 deletions(-)lib/bb/siggen.py +0
-0@@ -201,9 +201,6 @@ class SignatureGenerator(object):���� def
save_unitaskhashes(self):
�������� return
�
-��� defcopy_unitaskhashes(self, targetdir):
-������� return
-
���� defset_setscene_tasks(self, setscene_tasks):
�������� return
�lib/bb/siggen.py +0
-0@@ -418,9 +415,6 @@ classSignatureGeneratorBasic(SignatureGenerator):
���� defsave_unitaskhashes(self):Quoted 8 lines
Quoted 5 lines
��������
self.unihash_cache.save(self.unitaskhashes)�
-��� defcopy_unitaskhashes(self, targetdir):
-�������self.unihash_cache.copyfile(targetdir)-It breaks sstatetests.SStateBundles.test_minimal_bundle which uses
copy_unitaskhashes
Quoted 2 lines
Is that patch only in your -next branch? I didn't see this issue in my own testing which makes me wonder...
You are right, git blame told me it was applied a month ag and I didn't check further. I'll drop the patch.
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com