Skip to content

Conversation

@nathanchance
Copy link
Member

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.

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>
Copy link
Member

@nickdesaulniers nickdesaulniers left a comment

Choose a reason for hiding this comment

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

LGTM; thanks! 🇵🇼 🇦🇽

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
@nathanchance nathanchance merged commit 7d2bc8e into ClangBuiltLinux:main Mar 17, 2022
@nathanchance nathanchance deleted the smp-improvements branch March 17, 2022 18:17
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.

3 participants