From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756125AbcE0QN7 (ORCPT ); Fri, 27 May 2016 12:13:59 -0400 Received: from www.linutronix.de ([62.245.132.108]:47730 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753187AbcE0QN5 convert rfc822-to-8bit (ORCPT ); Fri, 27 May 2016 12:13:57 -0400 Date: Fri, 27 May 2016 18:13:54 +0200 From: Sebastian Andrzej Siewior To: Steven Rostedt Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: Re: [PATCH RT] kernel/printk: Don't try to print from IRQ/NMI region Message-ID: <20160527161354.GD24120@linutronix.de> References: <20160527135812.GB24120@linutronix.de> <20160527101251.0ae36e23@gandalf.local.home> <20160527145601.GC24120@linutronix.de> <20160527110658.41cdd123@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20160527110658.41cdd123@gandalf.local.home> X-Key-Id: 2A8CF5D1 X-Key-Fingerprint: 6425 4695 FFF0 AA44 66CC 19E6 7B96 E816 2A8C F5D1 User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Steven Rostedt | 2016-05-27 11:06:58 [-0400]: >You probably didn't remove it. It may have been removed a while ago >when Thomas did his big rewrite to get things working again. okay. As long as I don't lose patches :) >> about adding such a flag… I remember you had something in your tree to >> print from IRQ off regions via UART. > >I had a few hacks for a while, but they were nothing more than hacks. > >Perhaps we should make a better early_printk() or simple console for RT >that can handle printk in atomic locations. > >I have a hack patch that gives early_printk() a new "spin lock", where >it only takes the lock if the owner isn't on the CPU. Otherwise it >allows lock to continue (and wont release it). That hack was required >to get legible output from early_printk() when I was getting a bunch of >crashes on all the CPUs, because early_printk() has no locks, and the >console is just a mess when all CPUs print at once. An "atomic" console would be nice debugging wise. pstore with rawlocks would be available after a reboot if you can use pstore. And its overhead is probably not that huge. But its availability is limited. Another thing might be a dedicated 8250 UART console which would print in IRQ-off regions (and increase latency) but you would have the output which you wouldn't have otherwise (say from panic() handler). Anyway, nothing for production. Sebastian