RFC: Hiding per-CPU kernel output behind bootverbose
Colin Percival
cperciva at tarsnap.com
Sat Apr 21 20:50:26 UTC 2018
On 04/21/18 13:35, Warner Losh wrote:
> diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c
> index 3fcf7aa25152..4637243c4274 100644
> --- a/sys/x86/x86/mp_x86.c
> +++ b/sys/x86/x86/mp_x86.c
> @@ -1020,7 +1020,8 @@ init_secondary_tail(void)
> smp_cpus++;
>
> CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", cpuid);
> - printf("SMP: AP CPU #%d Launched!\n", cpuid);
> + printf("%s%d%s", smp_cpus == 1 ? "Launching APs: " : "",
> + cpuid, smp_cpus == mp_ncpus ? "\n" : " ");
Have you tested this? If you're going to print the header here, I think
you need to check for smp_cpus == 2, since it starts at 1 and is already
incremented once. (Because CPU #0 isn't an AP and thus doesn't hit this
code path.)
> which will print the results one at a time. Except when PRINTF_BUFR_SIZE is
> defined (which is in the GENERIC config). Do you have it in the kernel you're
> booting in the cloud?
I'm running GENERIC + options TSLOG, and (with a 500 ms delay added) I could
definitely see the individual numbers showing up one by one on the VGA output.
--
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
More information about the freebsd-hackers
mailing list