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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CEF3C433F5 for ; Fri, 22 Apr 2022 09:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1446109AbiDVJnF (ORCPT ); Fri, 22 Apr 2022 05:43:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1446173AbiDVJmw (ORCPT ); Fri, 22 Apr 2022 05:42:52 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A63BF2DF1; Fri, 22 Apr 2022 02:39:59 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 1E7251F37B; Fri, 22 Apr 2022 09:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1650620398; 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=T5U0TdGZsC4N5aGCqd4f8OyKOGtZqb/61/GfLpU2w0E=; b=pGqT86rX8p1N8RNPp7eaipCbSCdhjd/r7gVJrdTlzXa9Opuc7C3hl64qjmGzQ9IYjU4uPC 72DlJPFPFCRY3ptDM5cF3ItDYSWq/gO59pEBIn6pez2eYX+edxBBUBxUJjJv7HrAxRxECF r+z3l2cB0C6NEV7oly40Nrd5J4/S460= Received: from suse.cz (unknown [10.163.26.26]) (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 5B8032C142; Fri, 22 Apr 2022 09:39:57 +0000 (UTC) Date: Fri, 22 Apr 2022 11:39:51 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Andrew Morton , Randy Dunlap , Marco Elver , Stephen Boyd , Alexander Potapenko , Nicholas Piggin , Greg Kroah-Hartman , Jiri Slaby , "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Kees Cook , Luis Chamberlain , Xiaoming Ni , Peter Zijlstra , Andy Shevchenko , Corey Minyard , Bjorn Andersson , Sebastian Andrzej Siewior , Mark Brown , Daniel Lezcano , Matti Vaittinen , Dmitry Torokhov , "Eric W. Biederman" , Shawn Guo , Wang Qing , rcu@vger.kernel.org Subject: Re: [PATCH printk v4 00/15] implement threaded console printing Message-ID: References: <20220421212250.565456-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220421212250.565456-1-john.ogness@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2022-04-21 23:28:35, John Ogness wrote: > This is v4 of a series to implement a kthread for each registered > console. v3 is here [0]. The kthreads locklessly retrieve the > records from the printk ringbuffer and also do not cause any lock > contention between each other. This allows consoles to run at full > speed. For example, a netconsole is able to dump records much > faster than a serial or vt console. Also, during normal operation, > printk() callers are completely decoupled from console printing. > > There are situations where kthread printing is not sufficient. For > example, during panic situations, where the kthreads may not get a > chance to schedule. In such cases, the current method of attempting > to print directly within the printk() caller context is used. New > functions printk_prefer_direct_enter() and > printk_prefer_direct_exit() are made available to mark areas of the > kernel where direct printing is preferred. (These should only be > areas that do not occur during normal operation.) > > This series also introduces pr_flush(): a might_sleep() function > that will block until all active printing threads have caught up > to the latest record at the time of the pr_flush() call. This > function is useful, for example, to wait until pending records > are flushed to consoles before suspending. > > Note that this series does *not* increase the reliability of console > printing. Rather it focuses on the non-interference aspect of > printk() by decoupling printk() callers from printing (during normal > operation). Nonetheless, the reliability aspect should not worsen > due to this series. This version looks good enough for linux-next. I do not see any functional problem and it should work as designed. It is time to see how it works in various "real life" work loads. I am going to push it later today unless anyone (John) complains ;-) Best Regards, Petr