Skip to content

Added hugepage counting logic#207

Open
aanyas72 wants to merge 2 commits intomainfrom
hugepages
Open

Added hugepage counting logic#207
aanyas72 wants to merge 2 commits intomainfrom
hugepages

Conversation

@aanyas72
Copy link
Copy Markdown
Contributor

@aanyas72 aanyas72 commented Apr 2, 2026

Added logic to count the number of hugepages. I tested this with a simple c script that allocates and deallocates hugepages and it seems to count the pages correctly.

@aanyas72 aanyas72 requested a review from a team as a code owner April 2, 2026 22:26
@aanyas72 aanyas72 requested a review from aneeshdurg April 2, 2026 22:27
Copy link
Copy Markdown
Contributor

@arthurp arthurp left a comment

Choose a reason for hiding this comment

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

Nits. Wait for @aneeshdurg for a real review.

let mut procs: Vec<Arc<Process>> = Vec::new();
let initproc = INITPROC.get().expect("initproc not yet initialized");
procs.push(initproc.clone());
while let Some(proc) = procs.pop() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks slow. Should it have a TODO to optimize it? (Don't optimize it now.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Aneesh said to do it this way for now but I can put a todo to fix it later.

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.

2 participants