Skip to content

Conversation

@adityamandaleeka
Copy link
Member

This PR removes the SORT_MARK_STACK feature and related rqsort1 function from the GC. These aren't used and if we need them, we can always bring them back from history.

I don't know the full history here but I assume it's not enabled because the performance benefits weren't worth the sorting cost. Plus we have prefetch in the mark phase now which should help hide memory latency.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

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 removes the unused SORT_MARK_STACK feature from the garbage collector. The feature was designed to sort the mark stack during GC marking phases to potentially improve memory access patterns, but it was never enabled in production builds. With prefetch optimization now available in the mark phase, this sorting code is no longer needed.

Changes:

  • Removed the rqsort1 function that implemented reverse quicksort for sorting mark stack entries
  • Removed all SORT_MARK_STACK conditional compilation blocks from both foreground and background GC marking functions

@AaronRobinsonMSFT
Copy link
Member

Is it possible this was a diagnostic tool used during GC development/debugging scenarios?

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.

2 participants