Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Apr 2018 20:50:19 +0000
From:      Colin Percival <cperciva@tarsnap.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        gljennjohn@gmail.com, Konstantin Belousov <kib@freebsd.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Conrad Meyer <cem@freebsd.org>
Subject:   Re: RFC: Hiding per-CPU kernel output behind bootverbose
Message-ID:  <01000162e9f8cc9a-4ffd1c10-d640-47b0-bfae-6769dff4f78b-000000@email.amazonses.com>
In-Reply-To: <CANCZdfr1fXa6KCW8YV_i2737X9K3Sp=seLwjEerU_wrkmgHhgQ@mail.gmail.com>
References:  <01000162df15f856-1e5d2641-2a72-4250-8d8e-adcd47bc5db4-000000@email.amazonses.com> <20180419204405.GE6887@kib.kiev.ua> <CAG6CVpUerOo%2B55nJq61Hy83RYpbOZS6puEDuemspfNS12urZZw@mail.gmail.com> <20180419214550.GF6887@kib.kiev.ua> <01000162e58a466e-98f0305b-1723-467a-bc49-342c3fa9fc5b-000000@email.amazonses.com> <20180421092049.GM6887@kib.kiev.ua> <20180421123544.56d7e690@ernst.home> <CANCZdfpi7fZky9VC_TZWhm4uuwnV1N=m3pO1MmDs9GKYJZgSwg@mail.gmail.com> <01000162e9e66255-b8ae47df-b48c-4512-a042-48df5604914b-000000@email.amazonses.com> <CANCZdfr1fXa6KCW8YV_i2737X9K3Sp=seLwjEerU_wrkmgHhgQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01000162e9f8cc9a-4ffd1c10-d640-47b0-bfae-6769dff4f78b-000000>