Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2431848rwl; Thu, 13 Apr 2023 06:29:32 -0700 (PDT) X-Google-Smtp-Source: AKy350YAd/MZkRtwvpyI6kLvpoAlaUeJ+27u4rCc3KMOSCSd4+ooSFxnSxAqkzxRkWPP9FVH8Zxl X-Received: by 2002:a05:6a20:3d1b:b0:e8:d8e5:4cc6 with SMTP id y27-20020a056a203d1b00b000e8d8e54cc6mr6222620pzi.5.1681392572311; Thu, 13 Apr 2023 06:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681392572; cv=none; d=google.com; s=arc-20160816; b=FXefrVJsWJ1YRzqXJsSbOtTpvHak762rRygfScl6CNbc/n4yrsiEVMqbqOj7ReqEZj XRY5V+cOuyXzV9Ld7m1zNh2dRT584j9aDJjuBgFykik5bHwZupAmUjIRE8rFUqN7e6qf D0Vt7rrbhaNu00HyWimGcshGd5usQ1VfCJkbZGldF/pG6DY7ixChw2QrUX+EP3pmOCGv Un68oHwHraQb+OdIbZGXs8OayAanHMdMlJ6jPZhTqbSHQP2e0vdOmO5vfjgCNnUkp2Us VrluTTyAlQHgmQs9ztIS0zzqGF+8GCVk5AxiBwP7uSeXEAx+lZAzDTzamG8Sgvp4oYfc lokA== 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=zJ+5SV+u+7p9Kyarz4Swyo5vf54KL6o/U/RSgcke/QI=; b=zQKoJ7FOtSkUz+kfYmA/UnAZBWnbtr7J66QvZWtSSA2D0X8MKV/KcNHxYnRkYvCmxY 5EZ01gAoQo8OSVPam6nf9pqsT4I5Y57AhBWjWgiWIfgvK+wV9Ih0tBJg4GmBbtVjBeAP gaB0skvMzc1KodnNKGmCkGJGsx6kTG0+H1vqggWkKDBjkKmBGQnqchdJhqcKI2CluJ5Q R4WDDvq/3PwVVurH8YVKUxva0bANuDIV69nPLLWQhPoc84pcc+REZo9omc6Ph2S6J0RQ wJx5C+IjCM/enL/J2aY7huOjwR8Rv78pJFEjvP4w2tx/nf70HbD3JWt1WARgxuWzS++S xuSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=S95RId8D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u184-20020a6385c1000000b0051986d5b352si2062136pgd.505.2023.04.13.06.29.18; Thu, 13 Apr 2023 06:29:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=S95RId8D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231349AbjDMN3F (ORCPT + 99 others); Thu, 13 Apr 2023 09:29:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjDMN3E (ORCPT ); Thu, 13 Apr 2023 09:29:04 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DF3A4683 for ; Thu, 13 Apr 2023 06:28:41 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id D2BED1F383; Thu, 13 Apr 2023 13:28:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1681392519; 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=zJ+5SV+u+7p9Kyarz4Swyo5vf54KL6o/U/RSgcke/QI=; b=S95RId8D9Az/W89VwnDsgiokXFpBWWLIsysKHJ+ift9cxYeRzwRAP9iPucg/0hdpuVsXf7 62XO97acs+1ETWokxU970cXK5yUgDGLrPXsIhgWFETM9KnT8eJF14dEgOLYl1m2FNx8suE sci9jYFE3EHu6GyHsQeNnRBFTWaUzVc= Received: from suse.cz (unknown [10.100.201.202]) (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 A10312C15B; Thu, 13 Apr 2023 13:28:38 +0000 (UTC) Date: Thu, 13 Apr 2023 15:28:38 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: (k)thread: was: Re: [PATCH printk v1 11/18] printk: nobkl: Introduce printer threads Message-ID: References: <20230302195618.156940-1-john.ogness@linutronix.de> <20230302195618.156940-12-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230302195618.156940-12-john.ogness@linutronix.de> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 2023-03-02 21:02:11, John Ogness wrote: > From: Thomas Gleixner > > Add the infrastructure to create a printer thread per console along > with the required thread function, which is takeover/handover aware. > Nit: Several variable and function name use "thread" + con.thread_pbufs + con.write_thread() + printk_threads_enabled and many others use "kthread": + con.kthread + con.kthread_waiting + cons_kthread_wake() + cons_kthread_create() + cons_kthread_should_wakeup() I do not see any pattern. It would be nice to choose just one variant for the cons/printk API. I slightly prefer "kthread" but "thread" would be fine as well. When we are on the (k)thread naming stuff. We talk about it historically as a printk (k)thread. But I often feels that it rather should be a console (k)thread, especially when we have one per console. That said, both variants make sense. The thread is used for showing messages from the printk ring buffer. Best Regards, Petr