Skip to contentSkip to conversation

tty/serial/8250: make touch watchdog settable

PATCH chenzhen (R) 2 participants 2 messages Jan 6, 2021 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): X/[email protected]

#2 lore raw
Quoted 6 lines · Sergey Senozhatsky
Quoted 5 lines · chenzhen

Since 54f19b4a6(tty/serial/8250: Touch NMI watchdog in wait_for_xmitr), serial8250 will always touch watchdog in write and wait_for_xmitr. However, serial8250 may become low speed thus take a long time to print. In this process, nmi and soft watchdog on current CPU will be invalid.

Quoted 6 lines
Quoted 2 lines

To resolve this problem, add a cmdline option "tty_watchdog_enable" to control the touchdog in serial8250.

Sorry, I don't understand - what does this fix?

	-ss

.

It fixes that if serial8250 is low speed on some machine, when it writes for a long time, NMI/softlockup watchdog will never bark and potential rlock will not be detected. So an option to control the touchdog in serial8250 may help.

Thanks for your reply!

                                                                 -Zhen Chen

#3 lore raw
Quoted 11 lines · chenzhen (R)
Quoted 10 lines · Sergey Senozhatsky
Quoted 7 lines · chenzhen

Since 54f19b4a6(tty/serial/8250: Touch NMI watchdog in wait_for_xmitr), serial8250 will always touch watchdog in write and wait_for_xmitr. However, serial8250 may become low speed thus take a long time to print. In this process, nmi and soft watchdog on current CPU will be invalid.

To resolve this problem, add a cmdline option "tty_watchdog_enable" to control the touchdog in serial8250.

Sorry, I don't understand - what does this fix?

Quoted 7 lines
Quoted 2 lines
	-ss

.

It fixes that if serial8250 is low speed on some machine, when it writes for a long time, NMI/softlockup watchdog will never bark and potential rlock will not be detected. So an option to control the touchdog in serial8250 may help.

This is the intention. Suppose that serial8250 triggers the lockup watchdog, how are you going to fix it? If you need to write NNNNN bytes to the slow 8250 port then there is nothing you can do about it; triggering watchdog from the 8250 write path is certainly not going to help. If you have an excessive number of printk()-s then reduce the number of spurious printk()-s (ratelimit, etc).

	-ss