You are not logged in.
The kernel paramater noreplace-smp is sometimes introduced to improve boot performance (e.g. https://gist.github.com/themagicalmamma … parameters).
Document says:
noreplace-smp [X86-32,SMP] Don't replace SMP instructions with UP alternatives.
If my PC supports SMP, should I use this?
If nosmp is used for security, should noreplace-smp not be used?
Last edited by oech3 (2025-04-02 11:54:18)
Offline
If nosmp is used for security, should noreplace-smp not be used?
I believe it will only have any effect if system has one CPU oneline https://github.com/torvalds/linux/blob/ … ve.c#L1748 otherwise the SMP code can not be replaced.
Last edited by loqs (2025-04-01 18:25:58)
Offline
@loqs Thankyou. I try noreplace-smp since I don't have CPU with one core and one thread.
Offline
@loqs Thankyou. I try noreplace-smp since I don't have CPU with one core and one thread.
What do you expect the option to do as the kernel will not attempt to patch out the SMP code as there are multiple CPUs online? Unless you are using it in addion to "nosmp". WIth respect to hardeneing have you confused "nosmp" with "nosmt" which disables symmetric multithreading and is an issue for certain exploits.
Last edited by loqs (2025-04-02 15:11:04)
Offline
@loqs Oh, I confused nosmt with nosmp.
Disabling real core is very very rare setting.
Last edited by oech3 (2025-04-03 17:36:28)
Offline
Disabling real core is very very rare setting.
Agreed disabling all but one core on a current CPU in order to gain performance from having the SMP code remaining active instead of being patched to UP only makes no sense. You could ask the author of that gist if they ever tried that recommendation and how they measured the performance improvement.
Offline
I remove this flag since I didn't see change at boot performance in systemd-analyze.
The flags of the gist seems taken from clear linux.
Offline
You are right. I have taken that optimization from Clear Linux.
Offline
You are right. I have taken that optimization from Clear Linux.
What CPU did you use when measuring performance gains with noreplace-smp?
Offline