Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4472586imb; Wed, 6 Mar 2019 14:23:59 -0800 (PST) X-Google-Smtp-Source: APXvYqx3AF55m0CgTlKYG14Azs4Q0KKk1KfENxlk507hP/9UIxFAoDWwAsmdXwNp4cATP7SBnmPk X-Received: by 2002:a17:902:5e2:: with SMTP id f89mr4165529plf.170.1551911039436; Wed, 06 Mar 2019 14:23:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551911039; cv=none; d=google.com; s=arc-20160816; b=Gc1JYFfhiCf0kryC3Vddf5TYuPDD9S2rSzYxkNstElqgBOVbXtGF19WyHuNpIiWzc7 An6ugkCpbnIeV6XIWlRpuqQHEWz/W9OBcVpjUYEwQVUvSToqwHEb7MUWoruHo6wcKO/q X/xFTAHdtnPlpr17Vwtotzd6tBuy/PvXxc6by6LULvvOfOrgmPZ+2og5crC2swi5hai/ cN6XJ95KpaR7dFlXAmjH5tApEgUTun/CE5ddVppMysO6FMaTibLh2BGIIoY/UdKRbbgn a3irBtz7rpQTGIB3IOSQrY0Ckb56Y0mEfI3AxOYZozurOiQn9FPSmHgGtb3NOfgJGu4t SpaA== 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=nkudUiH6b1Yi0GDLgn9/ewYBSidI4Ja+HiteA/bqAMY=; b=WoelFowJPe32/LThQoGZJ76Kb2pVJvXqAvJ+f5NznUN7a8ziabZTHGiXsLP90PxhGq L+2xWxHShCxWihPlzPG62GP7EbhIMXRjQSfoZttPlGeqwqGy5AuQVPKtICrX0yma/CGr 2WatgBvqOfHiG+ecXPSm+fHbXh5ADqnRXq3AfjJOuc+p+dU8q2KmPEaytknmrGk6JsP8 scF1QFCY9komBEZt/y5HDjpUIMQsFZ3Pf1e4adSriUGfY3AyKK5R6r60y0gjbDV/AgcM 7IGbh2SUYArUYqaORBmZt8ZIBPPR39XPNH0Kouiae4d1Oz4Or4Ffr/BVVFj83OiuOgee XHSg== 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 p7si2381291pgm.335.2019.03.06.14.23.44; Wed, 06 Mar 2019 14:23:59 -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 S1726756AbfCFWXM (ORCPT + 99 others); Wed, 6 Mar 2019 17:23:12 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:52560 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726293AbfCFWXL (ORCPT ); Wed, 6 Mar 2019 17:23:11 -0500 Received: from localhost ([127.0.0.1] helo=vostro.local) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1h1ewI-0006kr-4y; Wed, 06 Mar 2019 23:23:02 +0100 From: John Ogness To: Petr Mladek Cc: Sergey Senozhatsky , linux-kernel@vger.kernel.org, Peter Zijlstra , 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 08/25] printk: add ring buffer and kthread References: <20190212143003.48446-1-john.ogness@linutronix.de> <20190212143003.48446-9-john.ogness@linutronix.de> <20190304073856.GA552@jagdpanzerIV> <20190304100044.GC21004@jagdpanzerIV> <20190304110703.GA960@tigerII.localdomain> <87o96p9gtx.fsf@linutronix.de> <20190306155701.wc22i2no5swdcids@pathway.suse.cz> <87r2bjbt47.fsf@linutronix.de> Date: Wed, 06 Mar 2019 23:22:57 +0100 In-Reply-To: <87r2bjbt47.fsf@linutronix.de> (John Ogness's message of "Wed, 06 Mar 2019 22:17:12 +0100") Message-ID: <87k1hbbq2m.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-03-06, Petr Mladek wrote: >> _Both_ categories are important for the user, but their requirements >> are different: >> >> informational: non-disturbing >> emergency: reliable > > Isn't this already handled by the console_level? > > The informational messages can be reliably read via syslog, /dev/kmsg. > They are related to the normal works when the system works well. > > The emergency messages (errors, warnings) are printed in emergency > situations. They are printed as reliably as possible to the console > because the userspace might not be reliable enough. I've never viewed console_level this way. _If_ console_level really is supposed to define the emergency/informational boundary, all informational messages are supposed to be handled by userspace, and console printing's main objective is reliability... then I would change my proposal such that: - if a console supports write_atomic(), _all_ console printing for that console would use write_atomic() - only consoles without write_atomic() will be printing via the printk-kthread(s) IMO, for consoles with write_atomic(), this would increase reliability over the current mainline implementation. It would also simplify write_atomic() implementations because they would no longer need to synchronize against write(). For those consoles that cannot implement write_atomic() (vt and netconsole come to mind), or as a transition period until remaining console drivers have implemented write_atomic(), these would use the "fallback" of printing fully preemptively in their own kthread using write(). Does this better align with the concept of the console_loglevel and the purpose of console printing? John Ogness