Hi,

On Fri, Feb 26, 2021 at 05:47:52PM +0000, Richard Purdie wrote:
> Calling sync between each file compare is horrible performance wise
> as we compare thousands of files. We don't care about IO latency here
> so disable.
> 
> Signed-off-by: Richard Purdie <[email protected]>
> ---
>  meta/lib/oeqa/selftest/cases/reproducible.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py 
> b/meta/lib/oeqa/selftest/cases/reproducible.py
> index ce4e8ebe06b..05fc4b7fa0a 100644
> --- a/meta/lib/oeqa/selftest/cases/reproducible.py
> +++ b/meta/lib/oeqa/selftest/cases/reproducible.py
> @@ -123,7 +123,7 @@ def compare_file(reference, test, diffutils_sysroot):
>          result.status = MISSING
>          return result
>
> -    r = runCmd(['cmp', '--quiet', reference, test], 
> native_sysroot=diffutils_sysroot, ignore_status=True)
> +    r = runCmd(['cmp', '--quiet', reference, test], 
> native_sysroot=diffutils_sysroot, ignore_status=True, sync=False)

Uh, sync is horrible for performance. Why don't we change it to false
by default:

--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -167,7 +167,7 @@ class Result(object):
     pass
 
 
-def runCmd(command, ignore_status=False, timeout=None, assert_error=True, 
sync=True,
+def runCmd(command, ignore_status=False, timeout=None, assert_error=True, 
sync=False,
           native_sysroot=None, limit_exc_output=0, output_log=None, **options):
     result = Result()
 

Based on comment:

    # tests can be heavy on IO and if bitbake can't write out its caches, we 
see timeouts.
    # call sync around the tests to ensure the IO queue doesn't get too large, 
taking any IO
    # hit here rather than in bitbake shutdown.
    if sync:
        p = os.environ['PATH']
        os.environ['PATH'] = "/usr/bin:/bin:/usr/sbin:/sbin:" + p
        os.system("sync")
        os.environ['PATH'] = p

this looks like a workaround for some other bug.

Cheers,

-Mikko

>      if r.status:
>          result.status = DIFFERENT
> -- 
> 2.27.0
> 

> 
> 
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148783): 
https://lists.openembedded.org/g/openembedded-core/message/148783
Mute This Topic: https://lists.openembedded.org/mt/80933358/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to