Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3570945imm; Wed, 5 Sep 2018 02:18:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYZuEKvcezvMq3yMSoCI4JUbwaaHJQtXIggh/zEXMMVXIUmJ8h4Mg3gUHVo4u3LqmFXkiED X-Received: by 2002:a62:c805:: with SMTP id z5-v6mr39855873pff.44.1536139116855; Wed, 05 Sep 2018 02:18:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536139116; cv=none; d=google.com; s=arc-20160816; b=UVQ1XQj/afRoUJ02f72dS+9KbYC30hu4JKk85rYzlaMUSclyeiJR0OqlaVFVOSmmC6 UteIoKQpetLciRfZ1DVLnXXvnrNIcUo4gEyErxCc9jIMcADo/QhU3NoP58vagZilHSn2 k/ZzuNzsginpjFMkX2payg8dN9eILJXwpq7uM8dIZbwQsiSes+N+EVxqI8ce5UslkAOn Yy09eweFlgLI/LENukh3Sh8hfWLdaeC+eAE90h3cwyvRObKvLILJ201BWQE83+BGj2qc pt2pZbi7rIGzsQ6TTAZfikmXC5w5M4WYZTf3XotW8i+in5oGta1eQMaRqUzPA8wUGIeg 9/ew== 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 :in-reply-to:references:mime-version; bh=NelYs/EqT/Fx+7sSuhyYfF4NmzW8l7r/BtC6f9jADw8=; b=magUdHQM+bf4sWJI5GDzTykLlDcTHZuPZSy+JcAKWY5mCQwN/SeCZVf9DvhAQN6nzP 9XA9FndKNkgbUoq9uQ+8ZmYkZ27Ezjdg9IY/Ad53UUTP4TkkKO3YyF+emsEWG5jAw6ej I1JwEerGBx5vRDcY/R1HPKGzXWx3ph25D1a6isHG89MN7zpJcvkYxcWFxIT79v/Ecul0 zIXXXrXz0GL4lrkUFwMk3m+369cGu7KjzvKgRdOBRnKUSaA9w3CPSMHbgbrrqFKrVtDc a9AdbPUCQ6klcT32WKQqQ8YN1PNUtxV0B0Cj8zoYYYRtj2MQCb7QOdRwKs2qVkgr0Ewe Ag2A== 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 z13-v6si1476630pgk.127.2018.09.05.02.18.21; Wed, 05 Sep 2018 02:18:36 -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 S1728224AbeIENqR (ORCPT + 99 others); Wed, 5 Sep 2018 09:46:17 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:42571 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728031AbeIENqQ (ORCPT ); Wed, 5 Sep 2018 09:46:16 -0400 Received: by mail-lf1-f65.google.com with SMTP id z11-v6so5346872lff.9 for ; Wed, 05 Sep 2018 02:16:57 -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:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NelYs/EqT/Fx+7sSuhyYfF4NmzW8l7r/BtC6f9jADw8=; b=uCeqx5fU2hhFP1xQCy4ovUEsApLuuvexCZH9Jc7PrpelOBhmwK4MowYpeT5Z1BpPjw /014zCQjdZXhz67trWTlzTQWNZY+14XIZBxL0XCKhAY3Vc+6MIXFGNLJXl8HlPCAtank 1jB3ZT208P9FJAlAkEXOyxHnCK6hQq1RYhO8afuuO3XOFq+gibVD9WiFm3DVQ1GTsEMp IXNlzZewYXkn0+A+JvBCHQqhm0SmyE2jMInOm8GxQwE+4aXSKI9XKmAjhDc5np3AE+mz 0/0FwPvTslOrXfJOZUub+i9P3HVpx5rzp2DBUi9+6wp11X+RK4NDdpA+ApqjCRP/7B53 YLMw== X-Gm-Message-State: APzg51AeEPhwmRtL4AFexgS3pV2bN2OM9+EC+4jDEMD6lU4uVo2DwLlN mXy/h4uC4dXDmEyY5QepkSHwFyYy8wUf7PbJFeFH1Q== X-Received: by 2002:a19:57c5:: with SMTP id l188-v6mr24362974lfb.109.1536139017061; Wed, 05 Sep 2018 02:16:57 -0700 (PDT) MIME-Version: 1.0 References: <20180829003539.668e514c@roar.ozlabs.ibm.com> <20180831134943.7f516fed@roar.ozlabs.ibm.com> <20180905135359.26992d29@roar.ozlabs.ibm.com> In-Reply-To: <20180905135359.26992d29@roar.ozlabs.ibm.com> From: Matteo Croce Date: Wed, 5 Sep 2018 09:16:20 +0000 Message-ID: Subject: Re: VirtIO console hangs To: Nicholas Piggin Cc: Greg Kroah-Hartman , Jiri Slaby , Michael Ellerman , Benjamin Herrenschmidt , linux-kernel@vger.kernel.org, Lorenzo Bianconi 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 On Wed, Sep 5, 2018 at 3:54 AM Nicholas Piggin wrote: > > On Fri, 31 Aug 2018 15:17:44 +0000 > Matteo Croce wrote: > > > On Fri, Aug 31, 2018 at 3:49 AM Nicholas Piggin wrote: > > > > > > On Tue, 28 Aug 2018 15:00:14 +0000 > > > Matteo Croce wrote: > > > > > > > On Tue, Aug 28, 2018 at 2:35 PM Nicholas Piggin wrote: > > > > > > > > > > On Tue, 28 Aug 2018 12:54:08 +0000 > > > > > Matteo Croce wrote: > > > > > > > > > > > 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 > > > > > > > > > > Thanks for the report. I can't immediately see what the problem > > > > > is. Can you try get a stack trace of where it is stuck? > > > > > > > > > > > > > I tried but didn't get one. > > > > > > > > > Perhaps try this patch if you have time (it's a bit of a shot > > > > > in the dark). > > > > > > > > > > > > > Yes it seems to fix. Thanks! > > > > > > Okay sorry for the delay, I can reproduce it here and found a better > > > fix, if I could trouble you to test again. > > > > > > [PATCH] tty: hvc: hvc_poll() fix read loop hang > > > > > > > Hi Nicholas, > > > > the patch works, but now pasting text inside the terminal is extremely > > slow, it feels worse than a 9600 baud serial line. > > > > Btw, I had to apply the patch by hand as it was corrupted, some lines > > were collapsed into one. > > Not sure why that happened, I seem to be able to send myself > uncorrupted patches... > > Can you try this patch for performance? Hopefully it applies. Hi Nicholas, This one works really well, as in kernel 4.17. Feel free to add me in Tested-by or Reported-by (or both). Cheers, -- Matteo Croce per aspera ad upstream