Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp989112pxb; Fri, 22 Apr 2022 16:05:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrn7XfC7doxEq9ZdXPhue+2luWnnCC48vLsaVEMpSGGSuZk51BCi2y3Ecxc7bf90aKrEO6 X-Received: by 2002:a17:902:a413:b0:156:15b:524a with SMTP id p19-20020a170902a41300b00156015b524amr6794987plq.106.1650668756264; Fri, 22 Apr 2022 16:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650668756; cv=none; d=google.com; s=arc-20160816; b=vbcPOIIF2wMf/9JfzxIsg9LbA2zwT0RYKIbQ2wpdnNjx+2/viEurPkFYJZtF6I/15T pLILk3fzvdnKrESjdRXMRX2aEcB3CbNZpoKZyKss9F5aZ6Ls99+kl7oGM0qcdw/rWt/k 1oZl/1pzShmPmG5wYD6pva9lt9lkb2CS1J4+Om2yEvpXnRf5M18DZq/EGNb4asgF0Es6 rruY9a3zkkDLl4P8kiEC11oRdV7BIi/Eks574A6Xh+HGVcRyQoUe5cbmMlaeWzAayLvJ Ed5EXgZR0NImJwLMO+mF8FZsPj6uSe3cYh3qVE0J/jFQzHA/KcM9Q/EfWmmYVxAe9KcB pv/g== 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=DQC9EwCc1d1zwv7C55oUEIwJvP8u2qczlBIORadICHM=; b=perDNDxF1fs1LW7pEC5o/xGCsogDBhAwlcLzxG7fAtjGDK3nbZLitgKennL8a8odAe eWrHO79lmIema9pMcNYjNQJHViRSVI9uwRHujw0d2rLN1EO6yIE8L707fZFw0+x3oL/h oL7Rn25k0dzM3DUvTUyvlMG4iVhozmkmGO/peGIxGM9GjEgeaJHOH2CKVbMU0b2aCBaH //8NE/Jhjjt3LSxhQMixIFTwaVJJLB/W6nnbzg6PUg6714miD6nIZnw7fXV0XFJQEoIE sFxst7xNFzuaehi7KabI+HxgWrEI76sQuVCnVZQ3ehRqmn9TE8trhBOTaKTJ7UeNitt7 x0pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=uYZv5hZr; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id f2-20020a635542000000b003a283acb91fsi9193950pgm.436.2022.04.22.16.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 16:05:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=uYZv5hZr; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 B38812A6087; Fri, 22 Apr 2022 14:35:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230002AbiDVVi0 (ORCPT + 99 others); Fri, 22 Apr 2022 17:38:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbiDVViO (ORCPT ); Fri, 22 Apr 2022 17:38:14 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C53FC2A60A1; Fri, 22 Apr 2022 13:39:32 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 3F260215FF; Fri, 22 Apr 2022 20:29:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1650659358; 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=DQC9EwCc1d1zwv7C55oUEIwJvP8u2qczlBIORadICHM=; b=uYZv5hZrfXo2ih3eM61buBuIvSz6QOFFhD/teRRlFeYlIRGxdGRHYkRzeigC3ZoAYLJZy4 /xmA7IHpb9B0Z1fe2WOV2rI+8UjeTH2Ln4ZmlEcqiGNj5T7KgozDqEWusyu+VZwunc6EEX 6bVDIOlkieaPn/YgYHdJh5iL0s+JxrE= Received: from suse.cz (unknown [10.163.16.6]) (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 D85F42C145; Fri, 22 Apr 2022 20:29:16 +0000 (UTC) Date: Fri, 22 Apr 2022 22:29:16 +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: 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 Fri 2022-04-22 11:39:59, Petr Mladek wrote: > 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 ;-) I have pushed the patchset into printk/linux.git, branch rework/kthreads. Also I merged it into for-next branch. We are still discussing better solution of the complicated locking scheme[0]. The main purpose is to make it easier and more safe to use. Anyway, the current code looks safe. Any potential improvements should not affect the behavior. So, it is time to test it in linux-next. Let's see how survives hammering of various robots and people testing on linux-next. I keep my fingers crossed. Best Regards, Petr