Skip to content

Let Map32 use proper synchronization.#951

Draft
wks wants to merge 1 commit intommtk:masterfrom
wks:fix/map32-sync
Draft

Let Map32 use proper synchronization.#951
wks wants to merge 1 commit intommtk:masterfrom
wks:fix/map32-sync

Conversation

@wks
Copy link
Copy Markdown
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