ClangBuiltLinux / boot-utils

Collection of files for booting Linux kernels
26 stars 7 forks source link

enable more virtual cores for x86 #17

Closed nickdesaulniers closed 4 years ago

nickdesaulniers commented 4 years ago

The unit tests enabled via CONFIG_KCSAN_TEST require >1 CPU to run. Enable more cpu's via QEMU's -smp <n> command line flag.

Not sure if we should just do this for all ARCHs and if we should use a value like 8 or min(nproc, 8).

Signed-off-by: Nick Desaulniers ndesaulniers@google.com

nickdesaulniers commented 4 years ago

or maybe we should only do this for interactive mode? Though most systems these days have more than one core, so I would prefer to test that.

nickdesaulniers commented 4 years ago

also, I think nproc on travisci for us is 2.

nathanchance commented 4 years ago

We could start with $(nproc) and scale up or down from there.

If we encounter issues, we could do something like $(nproc) / 2.

nathanchance commented 4 years ago

Also, do we want to do this for all machines? Or just x86?

nickdesaulniers commented 4 years ago

Also, do we want to do this for all machines?

yeah might as well, let me send a fix

nickdesaulniers commented 4 years ago

Looks like for 32b x86, we'll get:

NR_CPUS/possible_cpus limit of 8 reached. Processor 72/0x8 ignored.

arndb commented 4 years ago

CONFIG_BIGSMP=y should allow 32 or 64 CPUs

nickdesaulniers commented 4 years ago

Also, do we want to do this for all machines? Or just x86?

Done, please re-review.

nathanchance commented 4 years ago

qemu-system-arm: Invalid SMP CPUs 48. The max CPUs supported by machine 'palmetto-bmc' is 2

When trying multi_v5_defconfig. Seems we have to do just 2 to avoid changing a bunch of configs.

arndb commented 4 years ago

qemu-system-arm: Invalid SMP CPUs 48. The max CPUs supported by machine 'palmetto-bmc' is 2

When trying multi_v5_defconfig. Seems we have to do just 2 to avoid changing a bunch of configs.

ARMv5 has no SMP support at all, it only works in ARMv6K or higher.

nickdesaulniers commented 4 years ago

ok, dropped the latest patch (kept them separate since we can squash+merge in github UI). I only really care about this for x86_64 ATM. If that changes, or we feel strongly about it, we can change it. Otherwise YAGNI.