Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp7062899imm; Tue, 28 Aug 2018 05:56:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbLXnXqozFgDbDYvQob/BlKkzH8jAcMd2mZCPgkrQoK2ry9mf/5um07WNvJdtdVienfPrNQ X-Received: by 2002:a62:aa02:: with SMTP id e2-v6mr1472738pff.211.1535460994906; Tue, 28 Aug 2018 05:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535460994; cv=none; d=google.com; s=arc-20160816; b=zCH0aVVBSKujD0fUVh8m2wOD/mosI/vjPYeMMvPVCuEMHoFQiJl7vnZihTcQITB6+H 9BfRS9PyUgYv6bOTDVp7j3IOcE/YeVOCyI/9Bs980icf1/pj5YGGI0C6sON/8myu8VGU 8H6/0z+Pc603/ryP/EnyIY5roL01zSzz8WIW6n4NmaTCGqwskpRmaVni1fAb20SFMTWi 4GMAZ8017PlW+yEp0VVjQHsL3DQ13Mcv1gxbUYZ0qrJOram5y5Y3eIDOWG/Jj6Gh6t2Q eegvUptkqTs6u+RDC7QzpHzstc0+jhwjkaClP5aBWQ/sP8cu08J70p3ML7tf8+YPe4V0 k8BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:arc-authentication-results; bh=jJ91tDEmfrAuyJMYmwnbXGVkdksIT+3U/yB4C2ilmPI=; b=lsZnECS5HvVWILAHBPKRudR3m/b4b0W6Bfm0lH5MgEZarXljkK5jnaP7Wit423suVP c9rDZoH2HTQKixbJnmW3c74Mr6Qv/MqVnRzSSP4NZXe1GGrzRYiMngUCfaTmBteQhuTS RVYNG5L06ZxR3ybp1Wqc+kacavqOMEElJH/lcmL9ZQ7G44olDpa8JDPvl92zMaFxB6Dd Z7GRDxgokp7FSY6SNNl15muo7hjBr3zliAt7NYaliJtT4U56m+7Qog+olJiy8ilLXAgW xFWAYej8L/kR+Vq3W+IrYmxnEjV9n/YyXqAEEXJYVLOmtmcgbauppF3WdVHXHloMbCSF wr9g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1-v6si953155pls.131.2018.08.28.05.56.19; Tue, 28 Aug 2018 05:56:34 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728001AbeH1Qqq (ORCPT + 99 others); Tue, 28 Aug 2018 12:46:46 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:38301 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727094AbeH1Qqp (ORCPT ); Tue, 28 Aug 2018 12:46:45 -0400 Received: by mail-lj1-f193.google.com with SMTP id p6-v6so1322816ljc.5 for ; Tue, 28 Aug 2018 05:54:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=jJ91tDEmfrAuyJMYmwnbXGVkdksIT+3U/yB4C2ilmPI=; b=N/trtRjCTkXXlsFwM3pLAPYhGzq0UGQ9RAPsIXmRMjAlBKq5Kdq6d2yXZxt/b9iwcz gTap7FFdt8LKtRi9tf/e3+g8mWt/8MrsjDGFSdjyzbhIbCWqfCxDFsBlgzt603lsAwyv rvYq8+hkPJPl3RsZgX847ZODtbnek0fbe1NqiGwmb2FrUU5Elrz3TC3XpA5gl1PqgySS +Rhv9UAHKvjrUFEYCChchnGBOBS6U5PAlG5KNQZ/bYqhNfEa4XquVRk/Q+kfGXwZ5FAi J0QIFJv8KxtHmB/ar7lY0L1SY8VRja40sTCVLkF+TPIPmU7ryesHVT/FEgJ9DrnWJrOv lv6A== X-Gm-Message-State: APzg51AS8Gf7jz3CV5opTCSkgiTlemWlk9mokUSgV5ed9qKFipA4I6WR P5TM5PwmQSJoSZ6+wFNDZbXw42eTJF28vN9Bs9ol5A== X-Received: by 2002:a2e:55dd:: with SMTP id g90-v6mr1213507lje.4.1535460884117; Tue, 28 Aug 2018 05:54:44 -0700 (PDT) MIME-Version: 1.0 From: Matteo Croce Date: Tue, 28 Aug 2018 12:54:08 +0000 Message-ID: Subject: VirtIO console hangs To: Nicholas Piggin Cc: Greg Kroah-Hartman , Jiri Slaby , Michael Ellerman , Benjamin Herrenschmidt , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With kernel 4.19.0-rc1 virtio_console hangs very often. I can always trigger the bug by pasting some characters in the terminal window, the console will stop receiving keypresses, but I can still see output from the console. Stangely, logging in the VM via SSH and sending lot of data to hvc0, like 'dmesg >/dev/hvc0' will fix the issue until the next paste. I did a git bisect and I've found that this is the offending commit, reverting it fixes it. Cheers, commit ec97eaad1383ab2500fcf9a07ade6044fbcc67f5 Author: Nicholas Piggin Date: Tue May 1 00:55:54 2018 +1000 tty: hvc: hvc_poll() break hv read loop Avoid looping with the spinlock held while there is read data being returned from the hv driver. Instead note if the entire size returned by tty_buffer_request_room was read, and request another read poll. This limits the critical section lengths, and provides more even service to other consoles in case there is a pathological condition. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman -- Matteo Croce per aspera ad upstream