From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CF21C33CB7 for ; Mon, 27 Jan 2020 12:32:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0994420CC7 for ; Mon, 27 Jan 2020 12:32:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730534AbgA0Mcy (ORCPT ); Mon, 27 Jan 2020 07:32:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:56856 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727326AbgA0Mcy (ORCPT ); Mon, 27 Jan 2020 07:32:54 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 32B08AAD0; Mon, 27 Jan 2020 12:32:50 +0000 (UTC) Date: Mon, 27 Jan 2020 13:32:49 +0100 From: Petr Mladek To: Eugeniu Rosca Cc: Geert Uytterhoeven , John Ogness , Linux Kernel Mailing List , Peter Zijlstra , Geert Uytterhoeven , Kuninori Morimoto , Andrew Gabbasov , Sanjeev Chugh , Sergey Senozhatsky , Steven Rostedt , Daniel Wang , Dean Jenkins , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , Dirk Behme , Alan Cox , Jiri Slaby , Peter Feiner , "open list:SERIAL DRIVERS" , Sergey Senozhatsky , Eugeniu Rosca Subject: Re: [RFC PATCH v1 00/25] printk: new implementation Message-ID: <20200127123249.t7agkht3ddgetfhf@pathway.suse.cz> References: <20190212143003.48446-1-john.ogness@linutronix.de> <20200120230522.GA23636@lxhi-065.adit-jv.com> <87v9p4mkhr.fsf@linutronix.de> <20200122023422.GA926@lxhi-065.adit-jv.com> <20200122165855.GA3485@lxhi-065.adit-jv.com> <20200124160929.GA10863@lxhi-065.adit-jv.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200124160929.GA10863@lxhi-065.adit-jv.com> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2020-01-24 17:09:29, Eugeniu Rosca wrote: > Hi Geert, > > On Wed, Jan 22, 2020 at 08:48:12PM +0100, Geert Uytterhoeven wrote: > > On Wed, Jan 22, 2020 at 5:59 PM Eugeniu Rosca wrote: > > > On Wed, Jan 22, 2020 at 08:31:44AM +0100, Geert Uytterhoeven wrote: > > > > On Wed, Jan 22, 2020 at 3:34 AM Eugeniu Rosca wrote: > > > > > So, what's specific to R-Car3, based on my testing, is that the issue > > > > > can only be reproduced if the printk storm originates on CPU0 > > Slight amendment the above statement. Below results are got on R-Car > H3ULCB running renesas-drivers-2020-01-14-v5.5-rc6 (cX stands for CPUx, > whitespace stands for clean audio, '!' stands for distorted audio): > > printk @: > c0 c1 c2 c3 c4 c5 c6 c7 > speaker-test @ c0 ! > c1 ! ! > c2 ! ! > c3 ! ! > c4 ! ! > c5 ! ! > c6 ! ! > c7 ! ! > > One can see two patterns in the chart. The audio has glitches whenever: > - printk and the audio application run on the same CPU, or: > - printk runs on CPU0 The proper longterm solution seems to be offloading printk console handling to a kthread so that it can be bound to a particular CPU and does not block audio. Anyway, there is a question whether you really need to send all messages via the serial console. It might make sense to filter less important messages using "loglevel=" or "quiet" kernel parameters. The full log can be read later from userspace (dmesg, syslog, /dev/kmsg). Filtering can get disabled when debugging non-booting kernel. In this case, a distorted audio is the least problem. Best Regards, Petr