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

Let Map32 use proper synchronization. #951

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

wks
Copy link
Collaborator

@wks wks commented Sep 11, 2023

DRAFT: This PR has undergone rudimentary tests with Map32. It works, but it has several problems:

  • This PR moves the doubly linked list Map32::prev_link and Map32::next_link into the Mutex, but much synchronization is still needed to guard the queries of "next contiguous chunks", "contiguous chunks size", etc. It is much easier to replace the doubly linked list with a per-space data structure before doing this PR. See Refactor VMMap and introduce ChunkResource #932 (comment)
  • The descriptor_map is now protected by a Mutex, but it is used by Space::in_space which is used by PlanTraceObject. It will hurt performance. We should replace descriptor_map with SFT as we discussed in Refactor VMMap and introduce ChunkResource #932 (comment) before proceeding with this PR.

This removes the need of self_mut by putting fields into Mutex or converting fields into atomic types.

This removes the need of `self_mut` by putting fields into Mutex or
converting fields into atomic types.
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.

1 participant