Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1119237imj; Thu, 14 Feb 2019 01:23:44 -0800 (PST) X-Google-Smtp-Source: AHgI3IaXXhPjlddbyH8ktBqnCXnoDMneE3LaEvS4q4H2eyPCIaMGPEFXuPmR5018rFvccA4AP64B X-Received: by 2002:a63:555b:: with SMTP id f27mr2771262pgm.313.1550136224860; Thu, 14 Feb 2019 01:23:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550136224; cv=none; d=google.com; s=arc-20160816; b=MP+7yLXwUK5m5yACA73a7TwFm1N9T0ur9kYchKViTfOJfVDlHtmwh/sPTpt+qox0/3 blJSOcv9GQOXobYy33xtX///16IMWfI6sHJ3y+up/7lkJqHNi7afvvyp69zP29adTLvA qvCnt1T7yeu/ePLfThVnrfwOhxoVnXni0nAUFeszDLdtwxN7V8LSeePDxubvCc1xhxit w1J4fcBAV7cyMWJREVWLGQCHPPXD8svcxdNbOzUhN46SzWk8idO6DkRyHWGmUnByfw8W P5Fq09Kwwtk8z+7q6ZGPVcxqly/R4pCmHKG5UmMxLimroAYB8+uwi0sawwFIqTHCdttM jefg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=1KQPtunrSdFINkwfYJyPb46dpx/ru5+vybdUbh9zbtI=; b=h5kT7DD4xU3KrcNRrjUZT1bk1XgWkuk2Fk9LRvqNtkf7IF/fEdRPHGudNdKrEF2dsL cUb9c/U7KD+BH7P1TmtoQ9YPycLroFdXE/sbfOYFJloD4yOBAroyUY7/ZGKUik0R6IlY /2cmO+SjO3uoFV9IecBa9ET7GmDJZz2Zs/eahqCDmS3JDT46TZHFSYBad4cs3bF6YsPg /T7AYBF9mKgaPTcsMRphcqwbD/3Db1q+BXWO7rpG199jJSbg5NGSnB6L5cqLh4wnLAyW UTw9fmRMkqJREzWQfl29asdvi9p0Ll60Gb/WBbP8mrU+0lW0m+6DuHLLpyjOS4mwlLVa CVoA== 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 t23si1926736plr.128.2019.02.14.01.23.22; Thu, 14 Feb 2019 01:23:44 -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 S2404238AbfBMWUY (ORCPT + 99 others); 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