Skip to content

Handle busy-loops that only use rdtsc#2314

Merged
sporksmith merged 2 commits intoshadow:mainfrom
sporksmith:rdtsc-busy
Aug 2, 2022
Merged

Handle busy-loops that only use rdtsc#2314
sporksmith merged 2 commits intoshadow:mainfrom
sporksmith:rdtsc-busy

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

Previously the rdstc emulation code directly retrieved and returned the
simulated time.

This change uses an emulated syscall to get the time, ensuring that when
model_unblocked_syscall_latency is enabled, we correctly move
simulated time forward and yield if enough time has passed.

Fixes #2299 (reply in thread)

@github-actions github-actions bot added Component: Libraries Support functions like LD_PRELOAD and logging Component: Testing Unit and integration tests and frameworks labels Aug 1, 2022
Previously the rdstc emulation code directly retrieved and returned the
simulated time.

This change uses an emulated syscall to get the time, ensuring that when
`model_unblocked_syscall_latency` is enabled, we correctly move
simulated time forward and yield if enough time has passed.
@sporksmith sporksmith marked this pull request as ready for review August 2, 2022 14:19
@sporksmith sporksmith requested a review from stevenengler August 2, 2022 14:21
@sporksmith sporksmith enabled auto-merge (squash) August 2, 2022 21:43
@sporksmith sporksmith merged commit fbe373f into shadow:main Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Libraries Support functions like LD_PRELOAD and logging Component: Testing Unit and integration tests and frameworks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants