Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3475477ybl; Mon, 27 Jan 2020 04:52:21 -0800 (PST) X-Google-Smtp-Source: APXvYqyueKwuK3Sxl9/8d4vwbUFVQ3raHA8H0fsYRq0XWNlzYRK23D5JtuqgbtaIHij0c3+BRZo6 X-Received: by 2002:a9d:7548:: with SMTP id b8mr11854384otl.74.1580129541309; Mon, 27 Jan 2020 04:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580129541; cv=none; d=google.com; s=arc-20160816; b=MEdmd4KFyucQS0dDYLGnsIEzBpE6Cv7xrjhbCRL84cpK1Qg+5tu/OQxHmh+qbKYHI5 YfFRUNOvzKAX/pliGOv0elgzt0+Bz399Nq5FmFNJDG35qMWalsW4ymKeUegigW/vfkSK zZHbq15yBBmoVbIVds6m+BJzWmhzqwLNDJkLZI4agwbuORexJ5bz3jj+Z2Rp4D5wJYWq mRCVpgpqj+aRA2vdPWXNEUNfTXb9jhWsBpv58adAPb/VfP8/7JktoLIZE3hOQpMSIgTH nVWtb45LKHimg8SqH66GAltr/8UokM/MYhxZXcpK/q2oHg3YhsUeet8LYL2x4wDsJ2F0 rk8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=SqISnK2uZkjRyAmcqfcomvu1ZjR/8xc1Do/HxwjbIRw=; b=W0toYIYzPZoHR3ZTj0DJA1ESpVwU6cHycfn2BpvNdS2XiXI9MjqoB6722AIOtQ4Oa1 G+N/5mcyQDU1CDYQb/7PdE2M4MdM588mNpjmXcJ3Mjto4Fu+yA0SLv/La59pVdx/QnBr xuJmADpKfnTEwoPUhlezd4o7ceXu1T2tcEqW7Desq31kN3GNLS6ERbVf+1oooKqK38G1 DsYFVmCfjDpZRFSVXVg8tp300bLU6G7A0YZpplm+Fjl6XeLb/1TFuifFSJwhFFlQoSLd QEX32DuuUHi/6Iz5I7+Gf3BdrViH7c3RJixiGtHxSG7vTID7vf+mOOrwCRFhDy1Jf6uH HVjQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y65si3792895oia.162.2020.01.27.04.52.09; Mon, 27 Jan 2020 04:52:21 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730358AbgA0Mcy (ORCPT + 99 others); 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