Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Apr 2018 12:20:49 +0300
From:      Konstantin Belousov <kib@freebsd.org>
To:        Colin Percival <cperciva@tarsnap.com>
Cc:        Conrad Meyer <cem@freebsd.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: RFC: Hiding per-CPU kernel output behind bootverbose
Message-ID:  <20180421092049.GM6887@kib.kiev.ua>
In-Reply-To: <01000162e58a466e-98f0305b-1723-467a-bc49-342c3fa9fc5b-000000@email.amazonses.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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 21, 2018 at 12:11:07AM +0000, Colin Percival wrote:
> On 04/19/18 14:45, Konstantin Belousov wrote:
> > On Thu, Apr 19, 2018 at 02:37:56PM -0700, Conrad Meyer wrote:
> >> On Thu, Apr 19, 2018 at 1:44 PM, Konstantin Belousov wrote:
> >>> The 'CPU XX Launched' messages are very useful for initial diagnostic
> >>> of the SMP startup failures. You need to enable bootverbose to see the
> >>> hang details, but for initial hint they are required. Unfortunately, AP
> >>> startup hangs occur too often to pretend that this can be delegated to
> >>> very specific circumstances.
> >>
> >> Really?  I don't know that I've ever seen an AP startup hang.  How
> >> often do they occur?
> > 
> > It was epidemic with Sandy Bridge, mostly correlated to specific BIOS
> > supplier and its interaction with the x2APIC enablement, see madt.c:170
> > and below.
> > 
> > There were several recent reports of the issue with Broadwell Xeon
> > machines, no additional data or resolution.
> > 
> > There are sporadic reports of the problem, where I do not see
> > a clear commonality.
> 
> Would it be sufficient for debugging purposes if I change the !bootverbose
> case from printing many lines of
> 
> SMP: AP CPU #N Launched!
> 
> to instead have a single
> 
> SMP: Launching AP CPUs: 86 73 111 21 8 77 100 28 57 42 10 60 87 88 41 113 36
> 19 72 46 92 52 24 81 90 3 107 96 9 14 80 118 29 121 62 74 56 55 1 12 63 18 67
> 13 45 102 33 94 69 68 93 83 48 31 30 32 51 89 71 78 64 84 123 61 40 47 37 22
> 54 101 38 4 97 44 17 109 104 5 85 43 2 99 39 65 95 53 58 66 91 125 23 115 16
> 35 79 112 103 82 7 75 11 6 98 15 126 127 20 70 34 105 27 50 116 120 49 25 108
> 106 122 117 114 26 110 59 76 124 119
> 
> ?  (With each AP printing its number as it reaches the appropriate point?)
> 
> This yields almost the same gain as silencing the launch messages completely,
> while still allowing you to see each CPU announcing itself.
I am fine with the behaviour, but I am not sure how would you implement
this.  printf(9) buffers the output, you need to flush it somehow.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180421092049.GM6887>