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 20FA7C35273 for ; Wed, 6 Apr 2022 02:32:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1849355AbiDFCeg (ORCPT ); Tue, 5 Apr 2022 22:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349583AbiDEW0v (ORCPT ); Tue, 5 Apr 2022 18:26:51 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E68E17A2F6; Tue, 5 Apr 2022 14:24:47 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1649193852; h=from:from:reply-to:subject:subject: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=NJUFDru3qyRPcfEWEwWxICWATudSEIElFknJUgTQ0rI=; b=cCDrq+y4GV3ckhkx0flFd1XPyBIxnBgkMD4TFRB8m3nQ+HlLtjIpzgwvCremvc1EzQLtqu +qhehmh6PeprC5PqL3qAAvNxiyR6qkzBGhSLt+XyHvBZRr2mqTVsFgdEIsI+VXx8CkREUN Us+Vxoci2U4gstiAPEVAwUub7+pMdMUp80sA/LewDbfaVc6MMeqloUiNNONCciWCQKnoWj i1XvU0GDjhnAssqIAYLJHu9QBixaB1lMNWeQKl4SlIppYJUPWRi18M0u8SL1phBxGAUCao 9cI2+xyzwHKD3uMCL/OrPB6gG+HnQv0M181JhYU1EOgOQ9RTUztrNwD2BnQcIQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1649193852; h=from:from:reply-to:subject:subject: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=NJUFDru3qyRPcfEWEwWxICWATudSEIElFknJUgTQ0rI=; b=Gf60UpzSNAwZhbH/FbvMcoEFj+IASDOG+6UsBJsVK9yir1a5I2JZsB9eUzG8bzlbDdMrVV RJms7BQQG5P33ECw== To: Andy Shevchenko Cc: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Andrew Morton , Marco Elver , Randy Dunlap , Alexander Potapenko , Stephen Boyd , 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 , Wei Liu , Xiaoming Ni , Peter Zijlstra , Helge Deller , Sebastian Andrzej Siewior , Daniel Lezcano , Shawn Guo , Dmitry Torokhov , Matti Vaittinen , "Eric W. Biederman" , Phil Auld , Juri Lelli , Wang Qing , rcu@vger.kernel.org Subject: Re: [PATCH printk v2 00/12] implement threaded console printing In-Reply-To: References: <20220405132535.649171-1-john.ogness@linutronix.de> Date: Tue, 05 Apr 2022 23:30:10 +0206 Message-ID: <87sfqrrzph.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-04-05, Andy Shevchenko wrote: > From the list of patches and the only one I am Cc'ed to I can't find > the answer to my question, It seems lore is having trouble picking up the series. Until then, I've pushed the series to github.com so you can see the code. > i.e. does it take care about console_unregister() cases at run time? > (We have some drivers to call ->exit() for console in that case, > perhaps it should do something before calling it.) Yes. In console_unregister(), the printing thread is shutdown before the actual console unregistration takes place. The thread is shutdown here: https://github.com/Linutronix/linux/blob/b27eb6c3d168d608b3a9d04578e030a3d79d889a/kernel/printk/printk.c#L3393 The console's exit() callback is below that: https://github.com/Linutronix/linux/blob/b27eb6c3d168d608b3a9d04578e030a3d79d889a/kernel/printk/printk.c#L3429 > Would be nice to see some pointers where I can find the answer and > maybe even describing in the cover-letter/commit > message/documentation. I suppose for the console thread patch [0] I could add a paragraph to the commit message mentioning kernel thread shutdown for console unregistration. [0] https://github.com/Linutronix/linux/commit/e26ae677da2e339dd268c1f871b81e61e782393f John