-
Notifications
You must be signed in to change notification settings - Fork 284
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
CP-52821: use Mtime in Xapi_periodic_scheduler #6161
Conversation
Isn't it better to rebase on master already and build on top of the scheduler changes there? Those rebase changes would have to be done later anyway, but then end up in a complicated and hard to review merge commit. |
There's a further improvement here: replace all |
I'll rebase this PR on top of master once Frediano's PR is merged. |
It's not clear what overflows you are talking about. Internally the timer is a counter since boot, that will overflow the PS: @psafont are you referring to floating point? Maybe it would be sensible to consider a too big timeout (like 10 years) as an error? |
One function returns an option in case of overflow, the other does not. Because, as you point out, the overflow won't happen in practise, I prefer to use the latter rather than the former.
I fundamentally disagree, timestamps are actually differences as well (between an epoch and a point in time), and the only practical difference is replacing is_{earlier,later} with is_{shorter,longer}. I'm fine with the improvement not being in this PR, it was only an observation |
Moved this to draft until the referenced PR is merged to master as this will need a rebase. #6155 |
Rebased on latest feature/perf (which in turn has been updated to include latest master). E.g. previously there was a +0.5 in the periodic scheduler, but now we just use Clock.Timer.remaining, so there could be some subtle differences in behaviour. |
de10750
to
bc5208f
Compare
Signed-off-by: Edwin Török <[email protected]>
Signed-off-by: Edwin Török <[email protected]>
Avoids dealing with overflow Signed-off-by: Edwin Török <[email protected]>
Rebased on latest |
"Minor" hidden change. Due to internal implementation moving from |
For something like 'run this task every 24h' that actually seems like the correct behaviour (even if the machine was asleep we'd want it to run the task if it wakes up sooner than that), so the periodic tasks should probably use BOOTTIME (i.e. But as you said we don't actually suspend Dom0, so we don't need to complicate the scheduler to make that distinction. |
Target: feature/perf
Note that this conflicts with 7e9310f?diff=unified&w=1, but is a pre-requisite of #6126