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

kernel/mm: Reduce stack footprint of page-table freeing #442

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

joergroedel
Copy link
Member

Turns out that the way the iterators are implemented in RawPageTablePart::free_lvl*() the compiler makes copies of entire pages on the stack, which overflows the 32 KiB stack pretty quickly.

Iterate over references only and significantly reduce stack usage of the page-table freeing code.

kernel/src/mm/pagetable.rs Outdated Show resolved Hide resolved
Turns out that the way the iterators are implemented in
RawPageTablePart::free_lvl*() the compiler makes copies of entire
pages on the stack, which overflows the 32 KiB stack pretty quickly.

Iterate over references only and significantly reduce stack usage of
the page-table freeing code.

Signed-off-by: Joerg Roedel <[email protected]>
@joergroedel joergroedel merged commit cd91a0d into coconut-svsm:main Aug 21, 2024
3 checks passed
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.

3 participants