-
Notifications
You must be signed in to change notification settings - Fork 104
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
Enable Link-Time Optimization (LTO) for the Rust part #1011
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.
What is the unresolved part? The C schedulers? Also it'd be nice to have a longer description in the commit message (like a summary of what you wrote in #1010), thanks
Yep.
Just did it :) |
@@ -13,3 +13,6 @@ members = ["rust/scx_stats", | |||
"scheds/rust/scx_layered", | |||
"scheds/rust/scx_mitosis"] | |||
resolver = "2" | |||
|
|||
[profile.release] |
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.
Maybe it's better to add another profile instead:
[profile.release-lto]
inherits = "release"
lto = true
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.
Personally I would prefer, that the default would use LTO, and for the CI we pass LTO off or so.
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.
The meson flag can be added, then we activate this in PKGBUILD.
What is pending here? |
I was waiting for the final decision about how exactly LTO should be enabled for the project: in a dedicated profile or in the regular Release Cargo profile; do I need to patch Meson build scripts in this PR too, etc. As far as I understand, no final agreement has been reached yet. |
I don't see a reason to not enable it by default on release builds. Let's enable it and see whether anyone complains. |
Enable Link-Time Optimization (LTO) for Rust schedulers. It improves the binary size and allows to a compiler perform more aggressive optimizations. More details in sched-ext#1010
Head branch was pushed to by a user without write access
Related to #1010 but doesn't completely resolve it