Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1506092ybj; Fri, 20 Sep 2019 11:36:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyY39uaa/XRXLrTb2EBu23MzMgilyE7g9rnRmx2hBFD4SZp5LqrZ56MsZxZ5fjdgVqEax4c X-Received: by 2002:a17:906:c310:: with SMTP id s16mr9989621ejz.178.1569004566113; Fri, 20 Sep 2019 11:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569004566; cv=none; d=google.com; s=arc-20160816; b=Ud4mJvjQGjzPeq1pfOQ8KjFtOsL5zoex5UI4Pg44yEXof3bcCb7M/P9nwTtjC4dNZr u6bFb2m2CM4fruFSw1HXIPREF5VII7CItOkf9gZ+lLilYsB6hrXPyIF40VWdBIU/Aet8 +lwM9hngtykBreF6IE/iwm8z0vINnG2A0HBmIVFVsL+H6YHWxL/rQHhWIRH5drldaZ29 2E5+0UM6AOBgjr+ohTx81ef3LQmXADMJNpBIHU89eSeA1srYtN/bP2awf73F2lICF+ee Ce6rlYqtZVjf0NHB5USqBC58rnjSGVhN+bXnSZTU9Hitud7x1uiB9TX5P7ICA67Ie/Xm kGkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=f16ki7Qprxq2/NTF9pMKzE4bJvr1ytkOp3tyS/yQdVM=; b=WP/VrawvMg1LnGgXQUIMQxvuD3ZCI66tFqRXiu/jvWhEhRFp6ZRnvzKBjoevYdnxZ1 Rc6CsLaA6kgQmxQLsM03DolRLoQVHj5F6tMON/uz3Pj6ufTwlqpQU/o2h1SCcNNdCRzK V7x3KQSXSzhlgfxYCO6eJjh7v+/XSJVgSa8xuz3cy0IHhwslOru2bDXhrqMAP/VgVAmL NWYs31dM1uVXXxpDtyLrY1o1S+6wY2RM9U7qzUHffvX+v376h2LLfJl6bf0y8FC4Nc5B UxgW+idI761iQoVSm0CtFJK2dGaCxiTJo0cUyVa6ivUM4LOSF8KswY9OcQZX/RRZ0S0V j20w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LiAKSKLX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si1456105ejc.23.2019.09.20.11.35.42; Fri, 20 Sep 2019 11:36:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LiAKSKLX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393107AbfITI5e (ORCPT + 99 others); Fri, 20 Sep 2019 04:57:34 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40687 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388411AbfITI5e (ORCPT ); Fri, 20 Sep 2019 04:57:34 -0400 Received: by mail-pg1-f196.google.com with SMTP id w10so3447524pgj.7 for ; Fri, 20 Sep 2019 01:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=f16ki7Qprxq2/NTF9pMKzE4bJvr1ytkOp3tyS/yQdVM=; b=LiAKSKLXLXhIc96xil6DvVoAkxPbosQZMhn5rZByCak0CL861RmoadQ5xb9ASV37fx FJ+UbGofyvCWAUNy+d8hOo0zrNdFTiwcuJRK1+Awh47G8pUKwsmTXFKi6wdMD++cXfOR y7Lb3Wwt6m9QOE5cgRHtPZTj/eMLrK2Y7e81+6kGkDRRsShfl1AvkUnVjdW6hryL0nqq G8xAk/n1SX2ag5HHKXglYxoiTzGUI0gKnwiaHqwfKRJl2lCqbE/RR3AcwcfjYIvCjlFi FKhfoaNy+Cp4fxVLeOHcUI5b1gqtayi7zRuX/NSVbrg0p7aUu+cME/mTmYOvLVY8KsOV IcPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=f16ki7Qprxq2/NTF9pMKzE4bJvr1ytkOp3tyS/yQdVM=; b=isZZ91OCxj79mMPtBIo3UL38xjx8JlY92LMn1usx68iHdksYzfcOnwJ//zwui3JV/x ltmaGVfESmRSE0xQksRnXOVnte6/kQdncLwmnedZmLMX43YUY852H7lQ5d6T/BRGF4Kp qieihRLEo/FazFZEqbU6Y7DFfC36arB+ZV47W9k8HH323AMYJDohdmpQswnYl33sniRI DbgZE2qFtyDd837sIe0u/xYNaUnNB3tf6E1IGdqxFe8qEmo/ncvhC8P1lHddTmk8Kw7r kOnI5GR8/mh6UauNjgeqSFdnQjiweQbMV8D3OlQBUzAPTJ6Xd/o/oY4sMWvV9ej7gp5w SE2A== X-Gm-Message-State: APjAAAXK0YwgYrfWp8cxwV4dfZy0+uv9M8rtElPqlnCqj91ThtWwBT41 Ebk4U3OjX1DUoNBh+fBOaZE= X-Received: by 2002:a17:90a:d101:: with SMTP id l1mr3447542pju.85.1568969853039; Fri, 20 Sep 2019 01:57:33 -0700 (PDT) Received: from hqjagain.localdomain ([47.56.172.21]) by smtp.gmail.com with ESMTPSA id u18sm3869743pgb.83.2019.09.20.01.57.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Sep 2019 01:57:32 -0700 (PDT) From: Qiujun Huang To: gregkh@linuxfoundation.org Cc: jslaby@suse.com, nico@fluxnic.net, textshell@uchuujin.de, daniel.vetter@ffwll.ch, sam@ravnborg.org, mpatocka@redhat.com, ghalat@redhat.com, linux-kernel@vger.kernel.org, hqjagain@gmail.com Subject: [PATCH] tty/vt: Touch NMI watchdog in vt_console_print Date: Fri, 20 Sep 2019 16:57:26 +0800 Message-Id: <1568969846-1800-1-git-send-email-hqjagain@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vt_console_print could trigger NMI watchdog in case writing slow: [2858736.789664] NMI watchdog: Watchdog detected hard LOCKUP on cpu 23 ... [2858736.790194] CPU: 23 PID: 32504 Comm: tensorflow_mode Not tainted 4.4.131-1.el7.elrepo.x86_64 #1 [2858736.790206] Hardware name: Huawei RH2288 V3/BC11HGSB0, BIOS 3.57 02/26/2017 [2858736.790222] task: ffff881e0a191640 ti: ffff881fd73a8000 task.ti: ffff881fd73a8000 [2858736.790358] RIP: 0010:[] [] native_queued_spin_lock_slowpath+0x15e/0x170 [2858736.790363] RSP: 0018:ffff88203f043db0 EFLAGS: 00000002 [2858736.790365] RAX: 00000000005c0101 RBX: 0000000000000246 RCX: 0000000000000001 ... [2858736.790452] Call Trace: [2858736.790521] [2858736.790521] [] queued_spin_lock_slowpath+0xb/0xf [2858736.790552] [] _raw_spin_lock_irqsave+0x37/0x40 [2858736.790653] [] scsi_end_request+0x104/0x1d0 [2858736.790656] [] scsi_io_completion+0x153/0x650 [2858736.790671] [] scsi_finish_command+0xd2/0x120 [2858736.790673] [] scsi_softirq_done+0x127/0x150 [2858736.790749] [] blk_done_softirq+0x8e/0xc0 [2858736.790811] [] __do_softirq+0xeb/0x2f0 [2858736.790813] [] irq_exit+0xf5/0x100 [2858736.790867] [] smp_call_function_single_interrupt+0x39/0x40 [2858736.790890] [] call_function_single_interrupt+0x9b/0xa0 [2858736.790973] ... PID: 1793 TASK: ffff88103445c2c0 CPU: 32 COMMAND: "java" #0 [ffff88103fe88e38] crash_nmi_callback at ffffffff810504d7 #1 [ffff88103fe88e48] nmi_handle at ffffffff8101c1f7 #2 [ffff88103fe88ea0] default_do_nmi at ffffffff8101c7d0 #3 [ffff88103fe88ec0] do_nmi at ffffffff8101c901 #4 [ffff88103fe88ee8] end_repeat_nmi at ffffffff8171176a [exception RIP: cfb_imageblit+1167] RIP: ffffffff813bdf8f RSP: ffff880006823380 RFLAGS: 00000046 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000005 RDX: 000000000000024d RSI: 00000000ff000000 RDI: 0000000000000001 RBP: ffff8800068233f0 R8: ffffffff81785e80 R9: ffffc9000c843168 R10: 0000000000000001 R11: 0000000000000000 R12: ffff882037a831ba R13: ffff882037a831af R14: ffffc9000c84316c R15: ffffc9000c843000 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 --- --- #5 [ffff880006823380] cfb_imageblit at ffffffff813bdf8f #6 [ffff880006823398] bit_putcs at ffffffff813b2307 #7 [ffff8800068234d0] bit_cursor at ffffffff813b1fc8 #8 [ffff8800068235f0] fbcon_scroll at ffffffff813aebda #9 [ffff880006823650] scrup at ffffffff81442600 ... the cpu23 wait for the same blk queue_lock Signed-off-by: Qiujun Huang --- drivers/tty/vt/vt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 34aa39d..cd32d66 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -105,6 +105,7 @@ #include #include #include +#include #define MAX_NR_CON_DRIVER 16 @@ -2978,6 +2979,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count) vc->vc_pos += 2; vc->vc_x++; } + touch_nmi_watchdog(); } if (cnt && con_is_visible(vc)) vc->vc_sw->con_putcs(vc, start, cnt, vc->vc_y, start_x); -- 1.9.1