New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to iphb client wakeups and rtc time/alarm management #8
Conversation
The rtc time is synchronized to system in two phases. First the rtc time of day is brought within one second of system time. Then sub-second timer is used to write rtc time of day again when system time is just past full second. Effectively this should make rtc wakeup alarms both more accurate (since the rtc is closer to system time) and less frequent (since rtc should always be a bit behind system time and thus the normal timers trigger before rtc alarms as long as the system is not suspended). Also while libiphb api still uses full seconds for wakeup ranges, they are processed internally in us/ms accuracy. This should limit the odd +/-1 second issues resulting from mixed use of system time, monotonic clock and rtc time of day. If libiphb clients request too wide mintime-maxtime range for the wakeup, the mintime is moved closer to maxtime. Also the client wakeups are done as late as possible, but if there are external clients that must be woken up, all eligible clients are woken up at the same time. [iphb] Improvements to iphb client wakeups and rtc time/alarm management
To support IPHB_GS_WAIT_30_SEC and IPHB_GS_WAIT_2_5_MINS the global slot wakeup requests must be rounded to 30 seconds instead of full minutes.
Use mintime = maxtime instead.
|
With the advent of git packaging, you'll want to use [FOO] type prefixes on your commit messages, where FOO might be dsme in this case. Each tagged release must have at least one such prefix, otherwise it won't build. The RPM changelog is automatically generated from these messages. P.S. will this fix constant spam like this?: May 27 15:04:08 localhost DSME[254]: IPHB: read /dev/rtc0: type=0xa0, count=1 because that's starting to make debugging really annoying. |
|
I've understood that the preferred way is not to have the [feature] in the "commit title", hence the last The "IPHB: read /dev/rtc0: type=0xa0, count=1" is not spam. It just highlighted that there were issues The "rtc alarm this and that" however were debug spam and are no longer emitted by default. |
Also sets rtc time only once if finetuning timer is not needed.
|
Just realized that also the "IPHB: read /dev/rtc0: type=0xa0, count=1" diagnostics were omitted by default. |
Improvements to iphb client wakeups and rtc time/alarm management
The rtc time is synchronized to system in two phases. First the rtc
time of day is brought within one second of system time. Then
sub-second timer is used to write rtc time of day again when system
time is just past full second. Effectively this should make rtc wakeup
alarms both more accurate (since the rtc is closer to system time) and
less frequent (since rtc should always be a bit behind system time and
thus the normal timers trigger before rtc alarms as long as the system
is not suspended).
Also while libiphb api still uses full seconds for wakeup ranges, they
are processed internally in us/ms accuracy. This should limit the odd
+/-1 second issues resulting from mixed use of system time, monotonic
clock and rtc time of day.
If libiphb clients request too wide mintime-maxtime range for the
wakeup, the mintime is moved closer to maxtime.
Also the client wakeups are done as late as possible, but if there are
external clients that must be woken up, all eligible clients are woken
up at the same time.
[iphb] Improvements to iphb client wakeups and rtc time/alarm management