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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 BFA58C43381 for ; Wed, 13 Feb 2019 22:20:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 94D69222CC for ; Wed, 13 Feb 2019 22:20:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404245AbfBMWUY (ORCPT ); Wed, 13 Feb 2019 17:20:24 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:47925 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404179AbfBMWUY (ORCPT ); Wed, 13 Feb 2019 17:20:24 -0500 Received: from localhost ([127.0.0.1] helo=vostro.local) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1gu2t0-0006xq-Ft; Wed, 13 Feb 2019 23:20:10 +0100 From: John Ogness To: David Laight Cc: "linux-kernel\@vger.kernel.org" , Peter Zijlstra , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Daniel Wang , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , Alan Cox , Jiri Slaby , Peter Feiner , "linux-serial\@vger.kernel.org" , Sergey Senozhatsky Subject: Re: [RFC PATCH v1 00/25] printk: new implementation References: <20190212143003.48446-1-john.ogness@linutronix.de> <6f965383270d45d6ac26529fec5ad470@AcuMS.aculab.com> Date: Wed, 13 Feb 2019 23:20:08 +0100 In-Reply-To: <6f965383270d45d6ac26529fec5ad470@AcuMS.aculab.com> (David Laight's message of "Wed, 13 Feb 2019 16:54:15 +0000") Message-ID: <87lg2js547.fsf@linutronix.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-02-13, David Laight wrote: > ... >> - A dedicated kernel thread is created for printing to all consoles in >> a fully preemptible context. >> >> - A new (optional) console operation "write_atomic" is introduced that >> console drivers may implement. This function must be NMI-safe. An >> implementation for the 8250 UART driver is provided. >> >> - The concept of "emergency messages" is introduced that allows >> important messages (based on a new emergency loglevel threshold) to >> be immediately written to any consoles supporting write_atomic, >> regardless of the context. > ... > > Does this address my usual 'gripe' that the output is written to the > console by syslogd and not by the kernel itself? If I understand it correctly, your usual 'gripe' is aimed at distributions that are turning off the kernel writing directly to the console. I don't see how that is a kernel issue. > When you are trying to find out where the system is completely > deadlocking you need the 'old fashioned' completely synchronous kernel > printf(). Emergency messages will give you that. They differ from the current implementation by changing printk to have the caller print only _their_ message directly without concern for past unseen non-emergency messages or which context they are in. John Ogness From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Ogness Subject: Re: [RFC PATCH v1 00/25] printk: new implementation Date: Wed, 13 Feb 2019 23:20:08 +0100 Message-ID: <87lg2js547.fsf@linutronix.de> References: <20190212143003.48446-1-john.ogness@linutronix.de> <6f965383270d45d6ac26529fec5ad470@AcuMS.aculab.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <6f965383270d45d6ac26529fec5ad470@AcuMS.aculab.com> (David Laight's message of "Wed, 13 Feb 2019 16:54:15 +0000") Sender: linux-kernel-owner@vger.kernel.org To: David Laight Cc: "linux-kernel@vger.kernel.org" , Peter Zijlstra , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Daniel Wang , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , Alan Cox , Jiri Slaby , Peter Feiner , "linux-serial@vger.kernel.org" , Sergey Senozhatsky List-Id: linux-serial@vger.kernel.org On 2019-02-13, David Laight wrote: > ... >> - A dedicated kernel thread is created for printing to all consoles in >> a fully preemptible context. >> >> - A new (optional) console operation "write_atomic" is introduced that >> console drivers may implement. This function must be NMI-safe. An >> implementation for the 8250 UART driver is provided. >> >> - The concept of "emergency messages" is introduced that allows >> important messages (based on a new emergency loglevel threshold) to >> be immediately written to any consoles supporting write_atomic, >> regardless of the context. > ... > > Does this address my usual 'gripe' that the output is written to the > console by syslogd and not by the kernel itself? If I understand it correctly, your usual 'gripe' is aimed at distributions that are turning off the kernel writing directly to the console. I don't see how that is a kernel issue. > When you are trying to find out where the system is completely > deadlocking you need the 'old fashioned' completely synchronous kernel > printf(). Emergency messages will give you that. They differ from the current implementation by changing printk to have the caller print only _their_ message directly without concern for past unseen non-emergency messages or which context they are in. John Ogness