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

Improve page allocator's efficiency #1418

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Tangzh33
Copy link
Contributor

@Tangzh33 Tangzh33 commented Oct 5, 2024

This is the subsequent pull request of #1137, as the final solution to issue #1044.

In this PR, we refactor the meta-system and import FreePage as the only handle of Free Meta to enhance concurrency safety. Based on the new context provided by Free Meta, we further implement safe linked list methods for FreePage and transplant the current page allocator to make use of it.

With all the aforementioned efforts, the new page allocator can manage pages at O(1) complexity under most scenarios(e.g., allocate, deallocate), while not depending on the heap allocator.

Fix #1044 .

@tatetian
Copy link
Contributor

tatetian commented Oct 6, 2024

Since this PR claims performance improvement, I am wondering if you have noticed any performance gains on LMbench?

@Tangzh33
Copy link
Contributor Author

Tangzh33 commented Oct 7, 2024

Since this PR claims performance improvement, I am wondering if you have noticed any performance gains on LMbench?

Thanks for the heads up. I am also curious about the performance gained.

Theoretically, this PR focused on improving efficiency on one core, not importing a fine-grained synchronize mechanism to improve concurrent efficiency. So the PR may behave better on the single-core bench.

However, this PR has passed all the debug-built tests while failing at release-built ones. Once I fix all the remaining failures, I will run benchmarks to fully assess the performance improved.

@Tangzh33 Tangzh33 force-pushed the improve_page_alloc_efficiency branch 5 times, most recently from c2015b9 to 6a56566 Compare October 14, 2024 13:59
@Tangzh33 Tangzh33 force-pushed the improve_page_alloc_efficiency branch from 6a56566 to 9fe6b4f Compare October 16, 2024 08:00
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.

Inject the page allocator into ostd
2 participants