Skip to content
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

pimd: fix missing the first round on wheel timer #10626

Closed
wants to merge 1 commit into from

Conversation

anlancs
Copy link
Contributor

@anlancs anlancs commented Feb 21, 2022

One wheel timer issue, let's see what you think.
Please check commit log.

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Feb 21, 2022

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-3571/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

`wheel_add_timer` will not *update* currrent wheel timer's wake-up time.
It means next wake-up time is set before this insertion, and can't be changed.
So added timers in this round between `current slot` and `nexttime slot`
will unluckily miss the current round.

Clearly it will lead to this problem:
You expect to be woken up within 30s, you maybe be woken up within 60s.
Yes, it is bad luck to miss the first round, but won't miss any more
rounds.

Coincidentally, pimd has one of the most important judgement for this
time. If missed the first round, pimd will miss all the world.

This fix is small and convervative. Just doubles the desired time interval.
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-3587/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Copy link
Member

@donaldsharp donaldsharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we fix the timer wheel to notice upon insertion that the timer may have changed and adjust it? I'll have a PR to do this shortly

@anlancs
Copy link
Contributor Author

anlancs commented Feb 23, 2022

Okay, thanks for @donaldsharp
Close it, continued by
#10630

@anlancs anlancs closed this Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants