-
Notifications
You must be signed in to change notification settings - Fork 203
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
[LibOS] Fix memmgr free list performance bug #2052
[LibOS] Fix memmgr free list performance bug #2052
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions, not enough approvals from maintainers (3 more required), not enough approvals from different teams (2 more required, approved so far: ) (waiting on @adrianlut)
-- commits
line 4 at r1:
Please wrap (see https://commit.style/).
-- commits
line 4 at r1:
We don't reference GitHub issues in the commits, we try to keep the git repo standalone. One reason for that is that this will turn into a dangling pointer if we'd move the repository somewhere else.
Code quote:
#2033
Jenkins, test this please |
4f42e8d
to
b44d41b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review. I changed the commit message as requested.
Reviewable status: all files reviewed, 2 unresolved discussions, not enough approvals from maintainers (3 more required), not enough approvals from different teams (2 more required, approved so far: ) (waiting on @mkow)
Previously, mkow (Michał Kowalczyk) wrote…
Please wrap (see https://commit.style/).
Done.
Previously, mkow (Michał Kowalczyk) wrote…
We don't reference GitHub issues in the commits, we try to keep the git repo standalone. One reason for that is that this will turn into a dangling pointer if we'd move the repository somewhere else.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: all files reviewed, all discussions resolved, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: ITL)
Jenkins, retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required) (waiting on @adrianlut)
-- commits
line 5 at r2:
Can be fixed during rebase -- I suggest to briefly mention the issue and add more back quotes, e.g., sth like:
The `CHECK_LIST_HEAD` macro in `common/include/list.h` is used in memmgr
to traverse the free list and perform assertion checks. However, the
loop is not removed by the compiler even in release mode, leading to
unnecessary overhead. This commit fixes this by changing the macro to
`(void)0` in release mode.
Code quote:
Fixes a memmgr performance bug by changing the CHECK_LIST_HEAD macro in
common/include/list.h in release mode to `(void)0`.
The `CHECK_LIST_HEAD` macro in `common/include/list.h` is used in memmgr to traverse the free list and perform assertion checks. However, the loop is not removed by the compiler even in release mode, leading to unnecessary overhead. This commit fixes this by changing the macro to `(void)0` in release mode. Signed-off-by: Adrian Lutsch <adrian.lutsch@cs.tu-darmstadt.de>
b44d41b
to
0997103
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
Previously, kailun-qin (Kailun Qin) wrote…
Can be fixed during rebase -- I suggest to briefly mention the issue and add more back quotes, e.g., sth like:
The `CHECK_LIST_HEAD` macro in `common/include/list.h` is used in memmgr to traverse the free list and perform assertion checks. However, the loop is not removed by the compiler even in release mode, leading to unnecessary overhead. This commit fixes this by changing the macro to `(void)0` in release mode.
Done.
Jenkins, retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
Jenkins, retest this please (a lot of connectivity errors on Jenkins, e.g. |
Jenkins, retest Jenkins-Direct-24.04 please (connectivity issues in CI again) |
Jenkins, retest Jenkins-SGX-24.04-musl please (connectivity issues in CI again) |
[LibOS] Fix memmgr free list performance bug
Fixes the memmgr performance bug described in #2033 by changing the
CHECK_LIST_HEAD
macro incommon/include/list.h
in release mode to(void)0
.Description of the changes
To fix the issue described in #2033, this PR surrounds the
CHECK_LIST_HEAD
macro defined incommon/include/list.h
with
#ifdef DEBUG
. In release mode, the macro is now replaced with(void)0
.This macro is currently only used in
memmgr.h
. Thus, changing it directly was the simplest fix of the performance bug.Fixes #2033
How to test this PR?
This change is