Re: Bug report: A commit about serial8250 cause the output disorderly at the phase of startup

From: John Ogness
Date: Tue Apr 23 2019 - 02:48:23 EST


On 2019-04-22, Hongzhi, Song <hongzhi.song@xxxxxxxxxxxxx> wrote:
> Anyone notice this issue?

Yes, I am aware of the issue. It is actually a feature, not a bug. ;-)
Individual LOG_CONT messages, when classified as emergency messages, are
printed immediately to the console. This makes them appear
"disorderly". It is not yet clear how best to deal with LOG_CONT
emergency messages. But I suppose we should introduce a config option to
disable atomic consoles altogether if users preferred buffered/delayed
printk output.

John Ogness


> On 4/19/19 10:24 AM, Hongzhi, Song wrote:
>> 1. Issue description:
>>
>> Boot kernel( >= linux-rt-devel-v5.0.3 ) with qemu.
>> Then qemu will print following disorderly messages.
>>
>> At the beginning, the messages are disorderly. But then it becomes
>> normally from printing "[ÂÂÂ 0.000000] 000: Linux version..."
>>
>> --------------------------------------------------
>> [ÂÂÂ 0.019000] 000: tsc: Unable to calibrate against PIT
>> [ÂÂÂ 0.002583] 000: 6199.83 BogoMIPS (lpj=3099918)
>> [ÂÂÂ 0.521247] 000: Intel(R) Core(TM)2 Duo CPUÂÂÂÂ T7700Â @ 2.40GHz
>> [ÂÂÂ 0.521247] 000:Â (family: 0x6, model: 0xf
>> [ÂÂÂ 0.521247] 000: , stepping: 0xb)
>> [ÂÂÂ 0.533126] 000: unsupported p6 CPU model 15
>> [ÂÂÂ 0.533318] 000: no PMU driver, software events only.
>> [ÂÂÂ 0.765082] 000: 1 ACPI AML tables successfully acquired and loaded
>> [ÂÂÂ 0.765274] 000:
>> [ÂÂÂ 0.785903] 000: Enabled 2 GPEs in block 00 to 0F
>> [ÂÂÂ 0.786128] 000:
>> [ÂÂÂ 0.835675] 000: acpi PNP0A03:00: fail to add MMCONFIG
>> information, can't access extended PCI configuration space under
>> this bridge.
>> [ÂÂÂ 0.892056] 000:Â 5
>> [ÂÂÂ 0.892289] 000:Â *10
>> [ÂÂÂ 0.892416] 000:Â 11
>> [ÂÂÂ 0.892527] 000: )
>> [ÂÂÂ 0.892661] 000:
>>
>> /* skip some repeated contents */
>>
>> [ÂÂÂ 5.052149] 000: , 512kB Cache
>> [ÂÂÂ 0.000000] 000: Linux version 5.0.3-yocto-preempt-rt+
>> (hsong@pek-lpggp1) (gcc version 8.3.0 (GCC)) #24 SMP PREEMPT Thu Apr
>> 18 03:29:58 EDT 2019
>> [ÂÂÂ 0.000000] 000: Command line: root=/dev/vda rw highres=off
>> console=ttyS0 mem=256M ip=192.168.7.4::192.168.7.3:255.255.255.0
>> vga=0 uvesafb.mode_opti0
>> [ÂÂÂ 0.000000] 000: x86/fpu: x87 FPU will use FXSAVE
>> [ÂÂÂ 0.000000] 000: BIOS-provided physical RAM map:
>> [ÂÂÂ 0.000000] 000: BIOS-e820: [mem
>> 0x0000000000000000-0x000000000009fbff]
>> [ÂÂÂ 0.000000] 000: BIOS-e820: [mem
>> 0x000000000009fc00-0x000000000009ffff]
>> [ÂÂÂ 0.000000] 000: BIOS-e820: [mem
>> 0x00000000000f0000-0x00000000000fffff]
>> [ÂÂÂ 0.000000] 000: BIOS-e820: [mem
>> 0x0000000000100000-0x000000000ffdbfff]
>>
>> --------------------------------------------------
>>
>> 2. Reproduce:
>> (1)build kernel: (Attachment is my .config)
>> make ARCH=x86_64
>> CROSS_COMPILE=[path-to-my-cross-toolchain]/x86_64-wrs-linux-
>>
>> (2)boot kernel with qemu:
>>
>> qemu-system-x86_64 \
>> -drive file=qemux86-64.rootfs.ext4,if=virtio,format=raw \
>> -nographic \
>> -kernel arch/x86/boot/bzImage \
>> -append 'root=/dev/vda rw highres=off console=ttyS0 mem=256M ip=dhcp'
>>
>> 3. Analysis:
>> I find the following commit from >=linux-rt-devel-v5.0.3. cause the
>> issue.
>>
>> b9d460e serial: 8250: implement write_atomic