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

Fix pmm deadlock #345

Open
wants to merge 8 commits into
base: mainline
Choose a base branch
from

Conversation

sparchatus
Copy link
Contributor

An ugly first attempt to allow pmm frame array refill without deadlocking.

Intended to fix #343

@sparchatus sparchatus requested a review from a team as a code owner December 2, 2024 14:04
@sparchatus
Copy link
Contributor Author

Optimally, we would refill the 4K frames while still holding the paging lock. However, this would need a new interface in pmm to allow refill without taking the paging lock again.

@sparchatus
Copy link
Contributor Author

there is still the deadlock issue where paging wants to get a frame but pmm is waiting for paging to map a new array. It looks like some kind of backoff is required.

@sparchatus sparchatus marked this pull request as draft December 2, 2024 15:01
@sparchatus
Copy link
Contributor Author

based on #344

Also fixes a (potential?) bug where total_free_frames did not count the early array frames.

@sparchatus sparchatus marked this pull request as ready for review December 3, 2024 09:44
@sparchatus sparchatus changed the title WIP: Fix pmm deadlock Fix pmm deadlock Dec 3, 2024
@sparchatus sparchatus force-pushed the fix_pmm_deadlock branch 2 times, most recently from 58ae195 to 6521e20 Compare December 4, 2024 09:33
jcjgraf
jcjgraf previously approved these changes Dec 4, 2024
Copy link
Contributor

@jcjgraf jcjgraf left a comment

Choose a reason for hiding this comment

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

I am no longer able to reproduce the deadlock 👍

@wipawel wipawel self-requested a review December 4, 2024 09:51
mm/pmm.c Outdated Show resolved Hide resolved
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.

[BUG] PMM Deadlock
3 participants