Improve default '-smp' value#57
Merged
nathanchance merged 3 commits intoMar 17, 2022
Merged
Conversation
msfjarvis
approved these changes
Mar 12, 2022
As noted on the review for ClangBuiltLinux#17, when booting an i386_defconfig kernel, there is a lot of spam in the boot logs because CONFIG_NR_CPUS is set to 8: [ 0.020644] APIC: NR_CPUS/possible_cpus limit of 8 reached. Processor 8/0x8 ignored. [ 0.021302] APIC: NR_CPUS/possible_cpus limit of 8 reached. Processor 9/0x9 ignored. [ 0.021964] APIC: NR_CPUS/possible_cpus limit of 8 reached. Processor 10/0xa ignored. [ 0.022642] APIC: NR_CPUS/possible_cpus limit of 8 reached. Processor 11/0xb ignored. With large machines, this can be quite noisy, as there is one print out for every CPU above 8. Refactor the logic for finding a sensible value based on CONFIG_NR_CPUS if a config can be found. If no config is available, default to 8, which is the default value for i386_defconfig. Signed-off-by: Nathan Chancellor <nathan@kernel.org>
For both ARCH=arm and ARCH=arm64 defconfig, the default of get_default_smp_value when there is no configuration available will work. Signed-off-by: Nathan Chancellor <nathan@kernel.org>
204a99e to
e623485
Compare
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
nickdesaulniers
approved these changes
Mar 17, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series implements a heuristic for the default '-smp' value when KVM is used and uses '-smp' for arm and arm64 KVM for better performance.