Skip to content

ChunkMap is broken when using multiple spaces that access it #1197

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

Closed
k-sareen opened this issue Sep 9, 2024 · 1 comment · Fixed by #1304
Closed

ChunkMap is broken when using multiple spaces that access it #1197

k-sareen opened this issue Sep 9, 2024 · 1 comment · Fixed by #1304

Comments

@k-sareen
Copy link
Collaborator

k-sareen commented Sep 9, 2024

tl;dr ChunkMap encodes global state (whether a chunk has been allocated or not) but is used as if it's a local metadata which can cause issues when using multiple spaces that access it such as ImmixSpace and MarkSweepSpace.

For more context see here: https://mmtk.zulipchat.com/#narrow/stream/262673-mmtk-core/topic/.60ChunkMap.60.20with.20ImmixSpace.20and.20MarkSweepSpace

@k-sareen
Copy link
Collaborator Author

See k-sareen@9ae4936 for my (ugly) solution to this.

github-merge-queue bot pushed a commit that referenced this issue Apr 30, 2025
… own chunks using chunk map (#1304)

The chunk map records the lowest chunk and the highest chunk used by a
space, and accesses all the chunk states (local side metadata) in the
range. There are multiple issues when we use discontiguous spaces.
1. Chunks in the range may be ~~used~~ unused, thus the local side
metadata may be unmapped.
2. Chunks in the range may belong to other spaces. If other spaces also
use the chunk map, they will list all the chunks even when the chunks do
not belong to the space.

This PR makes the chunk state side metadata as a global side metadata.
We need the chunk map for plans that use the chunk map. As we will use
mark sweep or nonmoving immix as the non moving policy, they both use
the chunk map, and the non moving policy is included in every plan, we
just include the side metadata for every plan.

This PR fixes #1197.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant