{"action":"opened","issue":{"url":"https://api.github.com/repos/ShabbyX/RTAI/issues/25","labels_url":"https://api.github.com/repos/ShabbyX/RTAI/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/ShabbyX/RTAI/issues/25/comments","events_url":"https://api.github.com/repos/ShabbyX/RTAI/issues/25/events","html_url":"https://github.com/ShabbyX/RTAI/issues/25","id":80313772,"number":25,"title":"Configure latency at run-time from init script","user":{"login":"zultron","id":1940736,"avatar_url":"https://avatars.githubusercontent.com/u/1940736?v=3","gravatar_id":"","url":"https://api.github.com/users/zultron","html_url":"https://github.com/zultron","followers_url":"https://api.github.com/users/zultron/followers","following_url":"https://api.github.com/users/zultron/following{/other_user}","gists_url":"https://api.github.com/users/zultron/gists{/gist_id}","starred_url":"https://api.github.com/users/zultron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zultron/subscriptions","organizations_url":"https://api.github.com/users/zultron/orgs","repos_url":"https://api.github.com/users/zultron/repos","events_url":"https://api.github.com/users/zultron/events{/privacy}","received_events_url":"https://api.github.com/users/zultron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-25T00:08:40Z","updated_at":"2015-05-25T00:08:40Z","closed_at":null,"body":"My [RTAI package `4.1` branch][3] builds the latest [ShabbyX/RTAI][1] code, and the [`linux-ipipe-deb` `3.16.7` branch][2] builds kernel packages from that.\r\n\r\nShabbyX/RTAI#24 raised the issue of scheduling latency calibration, which is reported to be done at build time, traditionally.  This doesn't make sense in a package setting, since latency values likely won't apply to the application host (if calibration on the build host is even possible, which it isn't in my environment).\r\n\r\nRTAI ships an init script that loads modules at boot time.  I propose to use this init script to run the `calibrate` tool on the application host to determine latency, and then load modules with the resulting figures.\r\n\r\nI'd appreciate help with these questions:\r\n\r\n- How exactly to determine the latency?  The [calibration `README`][4] says it's up to the user to determine a balance between the kernel and user space scheduling latency figures from the `calibration_helper` tool.  Any rules of thumb?\r\n\r\n- How to feed the results into which parameter of which module? The [latest (v. 3.4) user manual][5] appears out of date, referring to `rtai_lxrt.ko` and `rtai_ksched.ko`.\r\n\r\n- Does it make most sense to run `calibration_helper` just once and store the results in a `modprobe.d` or `/etc/default` config file, from where the results will be retrieved upon subsequent boots?  This would enable the user to further tune the value, as well as possibly saving time during boot.\r\n\r\n[1]: https://github.com/ShabbyX/RTAI\r\n[2]: https://github.com/zultron/linux-ipipe-deb/tree/3.16.7\r\n[3]: https://github.com/zultron/rtai-deb\r\n[4]: https://github.com/ShabbyX/RTAI/blob/master/base/arch/x86/calibration/README\r\n[5]: https://www.rtai.org/userfiles/documentation/documents/RTAI_User_Manual_34_03.pdf\r\n"}}