Skip to content

Conversation

@sielicki
Copy link
Contributor

@sielicki sielicki commented Jan 2, 2026

if (sec < prev_sec) but (ns > prev_ns), eg: wraparound on seconds occurs, this erroneously triggers.

if (sec < prev_sec) but (ns > prev_ns), eg: wraparound on seconds
occurs, this erroneously triggers.

Signed-off-by: Nicholas Sielicki <[email protected]>
Copilot AI review requested due to automatic review settings January 2, 2026 15:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in the event queue saturation check logic where timestamps are compared to detect hardware writebacks. The original code incorrectly used an OR condition that would trigger when nanoseconds increased regardless of whether seconds decreased, causing false positives when timestamp components wrapped around.

Key Changes:

  • Fixed timestamp comparison logic to properly handle two-part timestamps (seconds and nanoseconds)
  • Changed from (sec > prev_sec || ns > prev_ns) to (sec > prev_sec || (sec == prev_sec && ns > prev_ns))

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@jswaro jswaro left a comment

Choose a reason for hiding this comment

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

Let's discuss this internally. I don't think this is correct.

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