Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp971640pxb; Fri, 22 Apr 2022 15:39:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEHxZOvoe5R3we2ce14hrrnEs4K9ctZzAuk+JeYT2ST2wLh9vBrXE5H/Lj/h99EhMzosk7 X-Received: by 2002:a63:5756:0:b0:36c:67bc:7f3f with SMTP id h22-20020a635756000000b0036c67bc7f3fmr5789643pgm.389.1650667191768; Fri, 22 Apr 2022 15:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650667191; cv=none; d=google.com; s=arc-20160816; b=F0HWlLoq9RAyCjc2iUWWHrGY3L5zGeB0X5ZHjE5DgjDP47T0Phi0j742YfNlElhAEj 6+nEkc5N7kLj5AnTEMGqbbgjZ5kAKVJLB+r87P3cIJ/RdkIKLbLTVE0tALbrcVFwEhti s1RO8JxDEHhgMI6KLj4/6NulQyW75qTZLxAM1wP8czRc5qh96eMBrwrIzhA4IvOgHh6g 71W7xETWuj/JRa9ssEb3XMbmCuUfOI64QV7PIQEqvrujXhE7RhWOtn6BHzJ0FUX2Pj8D US9wsGqhty9gs9yLFkdvRTFlxOtRbLsXq2mTqc0McVY7JHuI0H+lNzf1KgcwH68/AT7e emgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=T5U0TdGZsC4N5aGCqd4f8OyKOGtZqb/61/GfLpU2w0E=; b=z9enJT7rqMyI79YloFz3jYXAR9VXHe+/3uT3cSXJERwaqxubfzGxTP5ZJnnqvqcfMh G2/5wzLC/1y/A5wj06xFX087S5twrEqeIrpHxFK4YwLbhECNRVAZW14o4RzbHFAo1ctp kZ9TcP8YSINLUSjLz6YsGNQlYD0NbJP7x3OwF3iEEWTgHSn0BfvQbueabsPsKihhVhp2 RneTD4den6uwuyLHej+opONZ2hOPKfyg1aY2m9e+zEPyS23r5dZ6uq02p14cnPZ62/GZ SjLPtFQWAYEDJY2otnuieU+GW+SZibxWhED78ugyF7dBhGE8bXs+qnZn7b1zsATk9GNM zxrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pGqT86rX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i185-20020a6387c2000000b003816043ef8csi8525785pge.385.2022.04.22.15.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:39:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pGqT86rX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 516881B2B21; Fri, 22 Apr 2022 13:27:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233807AbiDVJnE (ORCPT + 99 others); Fri, 22 Apr 2022 05:43:04 -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> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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