Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1209145ybl; Fri, 9 Aug 2019 22:57:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRZnWe4+SCcKvJFYM4Jb+odudtk0VeR8mCkzI3ocJbE93aBjL3qyZMtNUlggI4KMUW8xb4 X-Received: by 2002:a17:902:d892:: with SMTP id b18mr21210990plz.165.1565416649431; Fri, 09 Aug 2019 22:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565416649; cv=none; d=google.com; s=arc-20160816; b=dh5u029Pw8BcTdXYHcUUYohwEwRQIaqROAbhMxVrMmzIr6gweGXx7MpLFe2ZIjwhg8 o9/NwjSy8IFNw2lNG22UW7iTQRp7z/zAkokI0maax7Vz1f59dRNwxRwJDfqYSWZo8BBW CDDEApf5ePODZ8+MbhXsdBUCUfDs2Daz9Bti4Qa52LOzBroQjS5VEOriEs6lixVfoNvB CJD7lF98ht/R67ACxr/sfrbcSeUdh9XYY1xaZ2oU54TN86LrodxpsD3HIIpWt9Yyp807 0n5BEGt+XjQ6shfoqOr85w7vyhr1g2A/ujMkflYkON6vmPdIVHVezJG4oJsJzv+CQq3L 3bOQ== 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:references :message-id:in-reply-to:subject:cc:to:from:date; bh=aaH6ArWzDHI0FdK4BeGkb5ISgfI4sSbSVyoewszRdFY=; b=nIAA6WIJtIvYkP63U8iXvq9s2XI5Cg5b5rMoApaBG23wDq2gyF6wJZwqXmpXErBXm/ XKYIA6MV8CiBsZlMF4vVCnqvzcNz6G1A5ae22EUxTGt4dML/6DUD3tYKlIRnBbbGat4x lPvCOTAwBsQEJb875eBDFABpDzMQIV955noYstBhDvLc0x49l3l0n/urhiLBG4lfQvaD TSALJVrFi25qqqWN5r+iHva4T/Pw8LPJrahILgpxyJ4lWcrj5cHRBsdr7CrAesSCeWKm HnCFPOCydjjvv7UBURTcQPmqzpr3U+7BDnhNC6bOs2S/H3/ZhjWp0EyMPVkRSqGFpH5i x/7g== 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 cl13si51838618plb.97.2019.08.09.22.56.15; Fri, 09 Aug 2019 22:57:29 -0700 (PDT) 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 S1726014AbfHJFyR (ORCPT + 99 others); Sat, 10 Aug 2019 01:54:17 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:57982 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725763AbfHJFyR (ORCPT ); Sat, 10 Aug 2019 01:54:17 -0400 Received: from p200300ddd71876237e7a91fffec98e25.dip0.t-ipconnect.de ([2003:dd:d718:7623:7e7a:91ff:fec9:8e25]) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hwKKP-0001qU-GQ; Sat, 10 Aug 2019 07:54:09 +0200 Date: Sat, 10 Aug 2019 07:53:56 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds cc: Peter Zijlstra , John Ogness , Linux List Kernel Mailing , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , Andrea Parri , Sergey Senozhatsky , Brendan Higgins Subject: Re: [RFC PATCH v4 9/9] printk: use a new ringbuffer implementation In-Reply-To: Message-ID: References: <20190807222634.1723-1-john.ogness@linutronix.de> <20190807222634.1723-10-john.ogness@linutronix.de> <20190809061437.GE2332@hirez.programming.kicks-ass.net> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 9 Aug 2019, Linus Torvalds wrote: > On Thu, Aug 8, 2019 at 11:14 PM Peter Zijlstra wrote: > > Note that you can hook this into printk as a fake early serial device; > > just have the serial device write to the DRAM buffer. > > No, you really really can't. ... > Even the "early console" stuff tries to honor serialization by > console_lock and console_suspended etc. Or things like the "I'm in the > middle of the scheduler, so I won't be doing any real logging". If you think of it as the classic console you are right. What Peter has in mind is the extra stuff on top of this buffer patchset, which implements emergency write to consoles. That's an extra callback in the console struct, which can be invoked in such situations igoring context and console lock completely. Right now we have an implementation for serial only, but that already is useful. I nicely got (minimaly garbled) crash dumps out of an NMI handler. With the current mainline console code the machine just hung. So with this scheme we actually could hook your smart buffer into the console stuff and still achieve what you want. Thanks, tglx