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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS 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 821C0C4338F for ; Tue, 27 Jul 2021 07:26:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6644761179 for ; Tue, 27 Jul 2021 07:26:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235762AbhG0H05 (ORCPT ); Tue, 27 Jul 2021 03:26:57 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:36498 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235504AbhG0H04 (ORCPT ); Tue, 27 Jul 2021 03:26:56 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 145C322103; Tue, 27 Jul 2021 07:26:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1627370816; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BIRDRD9L4czToF86gzK0EPiIaFDmmYi9JHkmXI3ngzQ=; b=nJqvAQvqUxZZ5iCL8QYWjWGPVyDkMYBjRJVMYG19s7WhBLGIG4Kg9PRrCjcMUHPW5yFHCM 2mF/l/4bgDhpI+TWQPFm3lrdvLLUZBwX8OZdqxGQ4wX+eJqBw55B2LjMIA1DCAGo4Lvkm4 +SJtF34yqgIyDeVCvZyZaFocQovqWtE= Received: from suse.cz (unknown [10.100.224.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 8A49BA3B81; Tue, 27 Jul 2021 07:26:54 +0000 (UTC) Date: Tue, 27 Jul 2021 09:26:54 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Eric Biederman , Nicholas Piggin , Christophe Leroy , =?iso-8859-1?Q?C=E9dric?= Le Goater , Andrew Morton , Kees Cook , Tiezhu Yang , Alexey Kardashevskiy , Yue Hu , linuxppc-dev@lists.ozlabs.org, kexec@lists.infradead.org, Russell King , Ingo Molnar , Marc Zyngier , Valentin Schneider , Geert Uytterhoeven , Mike Rapoport , "Wolfram Sang (Renesas)" , Anshuman Khandual , Xiongwei Song , Frederic Weisbecker , Peter Zijlstra , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nick Terrell , Vipin Sharma , Rasmus Villemoes , Daniel Borkmann , Vlastimil Babka , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH printk v4 0/6] printk: remove safe buffers Message-ID: References: <20210715193359.25946-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715193359.25946-1-john.ogness@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2021-07-15 21:39:53, John Ogness wrote: > Hi, > > Here is v4 of a series to remove the safe buffers. v3 can be > found here [0]. The safe buffers are no longer needed because > messages can be stored directly into the log buffer from any > context. > > However, the safe buffers also provided a form of recursion > protection. For that reason, explicit recursion protection is > implemented for this series. > > The safe buffers also implicitly provided serialization > between multiple CPUs executing in NMI context. This was > particularly necessary for the nmi_backtrace() output. This > serializiation is now preserved by using the printk cpulock. > > With the removal of the safe buffers, there is no need for > extra NMI enter/exit tracking. So this is also removed > (which includes removing the config option CONFIG_PRINTK_NMI). > > And finally, there are a few places in the kernel that need to > specify code blocks where all printk calls are to be deferred > printing. Previously the NMI tracking API was being (mis)used > for this purpose. This series introduces an official and > explicit interface for such cases. (Note that all deferred > printing will be removed anyway, once printing kthreads are > introduced.) > > John Ogness (6): > lib/nmi_backtrace: explicitly serialize banner and regs > printk: track/limit recursion > printk: remove safe buffers > printk: remove NMI tracking > printk: convert @syslog_lock to mutex > printk: syslog: close window between wait and read The entire patchset has been committed into printk/linux.git, branch rework/printk_safe-removal. Note that I have updated the 4th patch as discussed, see https://lore.kernel.org/r/20210721120026.y3dqno24ahw4sazy@pathway.suse.cz https://lore.kernel.org/r/20210721130852.zrjnti6b3fwjgdzj@pathway.suse.cz Best Regards, Petr