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

issue: 4043235 TCP_USER_TIMER wrong RTO behavior #297

Open
wants to merge 1 commit into
base: vNext
Choose a base branch
from

Conversation

tomerdbz
Copy link
Collaborator

@tomerdbz tomerdbz commented Jan 14, 2025

Description

RTO calculations were producing wrong results over our incorrect TSC-based logic.

We were using /proc/cpuinfo which is not standardized, nor accurate:
htop-dev/htop#953

TSC is also x86 specific and considered unreliable in cases like dynamic frequency scaling.

Hence, we switch to platform clock which is more performant than chrono as can be seen here:
https://gcc.gnu.org/legacy-ml/gcc-help/2019-07/msg00068.html

What

Fix timers and RTO issues.

Why ?

Fix https://redmine.mellanox.com/issues/4043235.

Change type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Check list

  • Code follows the style de facto guidelines of this project
  • Comments have been inserted in hard to understand places
  • Documentation has been updated (if necessary)
  • Test has been added (if possible)

@tomerdbz tomerdbz force-pushed the 4043235_rto_tcp_user_timer branch 2 times, most recently from 181718c to 39bfa26 Compare January 14, 2025 09:18
Removing bugged time calculations using x86-specific
TSC to fix RTO issues.

Replaced with platform calulcation. (clock_gettime)

According to:
https://gcc.gnu.org/legacy-ml/gcc-help/2019-07/msg00068.html

This is more performant than previously considered chrono.

Signed-off-by: Tomer Cabouly <[email protected]>
@tomerdbz tomerdbz force-pushed the 4043235_rto_tcp_user_timer branch from 39bfa26 to b791de5 Compare January 19, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants