From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758312AbbIDKmb (ORCPT ); Fri, 4 Sep 2015 06:42:31 -0400 Received: from mail-qg0-f48.google.com ([209.85.192.48]:34738 "EHLO mail-qg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757849AbbIDKm3 (ORCPT ); Fri, 4 Sep 2015 06:42:29 -0400 Subject: Re: [PATCH] serial: core: prevent softlockups on slow consoles To: Vitaly Kuznetsov , Greg Kroah-Hartman References: <1441031656-17959-1-git-send-email-vkuznets@redhat.com> <20150904042039.GA3719@kroah.com> <87bndid52t.fsf@vitty.brq.redhat.com> Cc: Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "K. Y. Srinivasan" , Dexuan Cui From: Peter Hurley Message-ID: <55E97592.40307@hurleysoftware.com> Date: Fri, 4 Sep 2015 06:42:26 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <87bndid52t.fsf@vitty.brq.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/04/2015 03:19 AM, Vitaly Kuznetsov wrote: > Greg Kroah-Hartman writes: >> I don't like this, please narrow this down to the real problem that your >> hardware has here, the putchar function should not be this slow. If it >> is, something is wrong. > > I'm afraid this is really the case: > > 3) | serial8250_console_putchar() { > 3) | wait_for_xmitr() { > 3) # 3111.189 us | io_serial_in(); > 3) # 3115.334 us | } > 3) # 2234.099 us | io_serial_out(); > 3) # 5353.883 us | } > > This is one char and I use local pipe for Hyper-V output. In case > something like remote pipe is in use ... > > So I'm sorry, but I don't really understand the suggestion to 'narrow > this down' - this is how slow Hyper-V serial's implementation is, > io_serial_in() is just an inb() and io_serial_out() is an outb(). That corresponds to 330-440 baud. As far as I'm concerned, that's broken. Regards, Peter Hurley