poky: Default to enabling a local hash equivalence server
PATCH 1/1 poky: Default to enabling a local hash equivalence server
This doesn't particularly change performance but allows users to have build speedup doing rebuilds during local development so should be useful and enabled by default.
--- meta-poky/conf/distro/poky.conf | 3 +++ 1 file changed, 3 insertions(+)
meta-poky/conf/distro/poky.conf +3 -0
@@ -89,3 +89,6 @@ require conf/distro/include/security_flags.inc INHERIT += "uninative" INHERIT += "reproducible_build" + +BB_SIGNATURE_HANDLER ?= "OEEquivHash" +BB_HASHSERVE = "auto"
Signature · 1 line
2.20.1
It does seem to cause issues w/ PR Server usage and packagefeed stability. (I'm not saying don't do this, I think we absolutely SHOULD have it enabled.. we but we will need to figure out the issues.)
PR Service, when this is enabled, even if the hash is equivalent a new package version is produced (at least locally) in all cases.
Adding in packagefeed-stability and the image is generated with the new package versions that don't actually end up existing in the feed. (This might just be a packagefeed-stability bug and not hash equivalency.)
--Mark
Quoted 31 lines · Richard Purdie
This doesn't particularly change performance but allows users to have build speedup doing rebuilds during local development so should be useful and enabled by default.
Signed-off-by Richard Purdie <[email protected]>--- meta-poky/conf/distro/poky.conf | 3 +++ 1 file changed, 3 insertions(+)meta-poky/conf/distro/poky.conf +3
-1@@ -89,3 +89,6 @@ require conf/distro/include/security_flags.inc INHERIT += "uninative" INHERIT += "reproducible_build" + +BB_SIGNATURE_HANDLER ?= "OEEquivHash" +BB_HASHSERVE = "auto" -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#11851): https://lists.yoctoproject.org/g/poky/message/11851
Mute This Topic: https://lists.yoctoproject.org/mt/66431026/3616948
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 4 lines · Mark Hatle
It does seem to cause issues w/ PR Server usage and packagefeed stability. (I'm not saying don't do this, I think we absolutely SHOULD have it enabled.. we but we will need to figure out the issues.)
Right, there are potential interactions which we need to resolve. That said, I think the benefit is significant to the majority of users and most don't use PRServ so this is the right direction.
Quoted 2 lines
PR Service, when this is enabled, even if the hash is equivalent a new package version is produced (at least locally) in all cases.
Should it? I don't think that is what you want. If its not changed, you don't want to rebuild it? If you don't rebuild it, you don't need a new PR number?
You only want a new PR number if it rebuilds?
Fixing this could be as simple as ensuring its the unihash the PRServ sees rather than taskhash.
Quoted 4 lines
Adding in packagefeed-stability and the image is generated with the new package versions that don't actually end up existing in the feed. (This might just be a packagefeed-stability bug and not hash equivalency.)
I suspect we reworked parts of rootfs generation and this hasn't been tested with packagefeed-stability unfortunately.
I still hope we could obsolete packagefeed-stability with hashequiv.
Cheers,
Richard
Quoted 10 lines · Richard Purdie
Quoted 4 lines · Mark Hatle
It does seem to cause issues w/ PR Server usage and packagefeed stability. (I'm not saying don't do this, I think we absolutely SHOULD have it enabled.. we but we will need to figure out the issues.)
Right, there are potential interactions which we need to resolve. That said, I think the benefit is significant to the majority of users and most don't use PRServ so this is the right direction.
Quoted 6 lines
Quoted 2 lines
PR Service, when this is enabled, even if the hash is equivalent a new package version is produced (at least locally) in all cases.
Should it? I don't think that is what you want. If its not changed, you don't want to rebuild it? If you don't rebuild it, you don't need a new PR number?
If do_install was shown to be equivalent, and there is no metadata change (not sure how there could be if it was equivalent) then no reason to do_package.
Quoted 1 line
You only want a new PR number if it rebuilds?
That makes the most sense to me.
Quoted 2 lines
Fixing this could be as simple as ensuring its the unihash the PRServ sees rather than taskhash.
That should work, and would fit within the current design.
Quoted 9 lines
Quoted 4 lines
Adding in packagefeed-stability and the image is generated with the new package versions that don't actually end up existing in the feed. (This might just be a packagefeed-stability bug and not hash equivalency.)
I suspect we reworked parts of rootfs generation and this hasn't been tested with packagefeed-stability unfortunately.
I still hope we could obsolete packagefeed-stability with hashequiv.
I'm not sure if there are cases where packagefeed-stability would kick in that hash equivalency wouldn't.
--Mark
Quoted 14 lines
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.View/Reply Online (#11853): https://lists.yoctoproject.org/g/poky/message/11853
Mute This Topic: https://lists.yoctoproject.org/mt/66431026/3616948
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 11 lines · Mark Hatle
Quoted 9 lines · Richard Purdie
Quoted 4 lines · Mark Hatle
It does seem to cause issues w/ PR Server usage and packagefeed stability. (I'm not saying don't do this, I think we absolutely SHOULD have it enabled.. we but we will need to figure out the issues.)
Right, there are potential interactions which we need to resolve. That said, I think the benefit is significant to the majority of users and most don't use PRServ so this is the right direction.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
PR Service, when this is enabled, even if the hash is equivalent a new package version is produced (at least locally) in all cases.
Should it? I don't think that is what you want. If its not changed, you don't want to rebuild it? If you don't rebuild it, you don't need a new PR number?
If
do_installwas shown to be equivalent, and there is no metadata change (not sure how there could be if it was equivalent) then no reason todo_package.
Only sstate tasks can be determined to be equivalent because the mechanism used to determine equivalence is to checksum the sstate tarball contents. As such, do_install isn't eligible for hash equivalence and can't be shown to be equivalent.
Quoted 44 lines
Quoted 2 lines
You only want a new PR number if it rebuilds?
That makes the most sense to me.
Quoted 2 lines
Fixing this could be as simple as ensuring its the unihash the PRServ sees rather than taskhash.
That should work, and would fit within the current design.
Quoted 8 lines
Quoted 4 lines
Adding in packagefeed-stability and the image is generated with the new package versions that don't actually end up existing in the feed. (This might just be a packagefeed-stability bug and not hash equivalency.)
I suspect we reworked parts of rootfs generation and this hasn't been tested with packagefeed-stability unfortunately.
I still hope we could obsolete packagefeed-stability with hashequiv.
I'm not sure if there are cases where packagefeed-stability would kick in that hash equivalency wouldn't.
--Mark
Quoted 23 lines
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.View/Reply Online (#11853): https://lists.yoctoproject.org/g/poky/message/11853
Mute This Topic: https://lists.yoctoproject.org/mt/66431026/3616948
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.View/Reply Online (#11854): https://lists.yoctoproject.org/g/poky/message/11854
Mute This Topic: https://lists.yoctoproject.org/mt/66431026/3616693
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 16 lines · Mark Hatle
Quoted 14 lines · Richard Purdie
Quoted 4 lines · Mark Hatle
It does seem to cause issues w/ PR Server usage and packagefeed stability. (I'm not saying don't do this, I think we absolutely SHOULD have it enabled.. we but we will need to figure out the issues.)
Right, there are potential interactions which we need to resolve. That said, I think the benefit is significant to the majority of users and most don't use PRServ so this is the right direction.
Quoted 3 lines
PR Service, when this is enabled, even if the hash is equivalent a
new package version is produced (at least locally) in all cases.
Quoted 7 lines
Quoted 3 lines
Should it? I don't think that is what you want. If its not changed, you don't want to rebuild it? If you don't rebuild it, you don't need a new PR number?
If
do_installwas shown to be equivalent, and there is no metadata change (not sure how there could be if it was equivalent) then no reason todo_package.
The function would run at the do_package level since its the nearest sstate task. If the output from do_package is the same as some previous run, it is by definition binary identical and therefore doesn't need to bump PR (which would make it non-identical).
Multiple metadata input task hashes can give identical output, for example if the description in a patch header changes, the output wouldn't be expected to.
Thinking about this, the hard part may be a chicken and egg problem where we need PR to stay the same for the input so that when we build the output we can compare it and this may be the root of the issue you're seeing. The input hash for do_package would change which would mean a new PR each time. The output would then never match so hashequiv is bypassed.
One possible option may be to put do_install under sstate control. We never did that previously as it wasn't particularly useful taking build time and disk for little win. That may be different now.
Quoted 8 lines
Quoted 5 lines
I suspect we reworked parts of rootfs generation and this hasn't been tested with packagefeed-stability unfortunately.
I still hope we could obsolete packagefeed-stability with hashequiv.
I'm not sure if there are cases where packagefeed-stability would kick in that hash equivalency wouldn't.
I'm not entirely sure but I think with the do_install tweak above, I think hashequiv will perform *much* better and in the real world, I'm not sure what packagefeed-stability will add.
Cheers,
Richard