Bug 13590 - runqemu: High resolution timer deactivated for no reason (highres=off)
Summary: runqemu: High resolution timer deactivated for no reason (highres=off)
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 3.0.1
Hardware: All Multiple
: Medium+ normal
Target Milestone: 3.1 M1
Assignee: Jörg Vehlow
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-10-10 08:25 UTC by Jörg Vehlow
Modified: 2020-01-09 16:04 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Vehlow 2019-10-10 08:25:38 UTC
The runqemu script passes the option "highres=off" to the kernel command line for all architectures, if the root filesystem type is not "cpio.gz" or "cpio".

This does not really make sense and leads to very inaccurate timers. E.g. on arm64 the resolution of the realtime clock will be only 4 ms. On x86 it is 1 ms, which is still quite inaccurate.

It was detected running ltp tests. Especially timer_getoverrun 2-3 from the open_posix interface tests.


I tried to find a reason for this option and I think it sneaked itself into the code.

It was first introduced in commit 21949128eb6e8daf8308e29c19904288f9e341ef in 2010, which added it for all qemuarm machine-types. The commit is really bad, because it mixes two things ("Add support for mips and powerpc machines", "update qemuarm") and does not further explain what was updated for qemuarm.
At this point the options was added for all qemuarm machines.

Later in 2016 (commit b405712414de98cba3a645601419aceb32d52f02) the whole script was refactored. This commit adds the option to all machines except if the root filesystem type is "cpio.gz" or "cpio". No reasoning for this change was given.


I don't know if there is any reason at all to disable high resolution timers on arm. If the system does not support high res timers, they can be deactivated in the kernel options. There should be no reason for the runqemu script to do this.
Comment 1 Randy MacLeod 2019-10-10 14:55:32 UTC
 Jörg, Can you send a patch to the list and we'll test it in our autobuilder environment. See: http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded