Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4229287iog; Tue, 21 Jun 2022 15:06:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vKBhFHjJ1D0qdR/t7qikqisYKlIltR8ggtmpwidBjTb4Vfzjj6VuJRmErLnHuJ3DWw8lST X-Received: by 2002:a05:6402:4026:b0:435:87ec:467 with SMTP id d38-20020a056402402600b0043587ec0467mr271408eda.303.1655849175038; Tue, 21 Jun 2022 15:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655849175; cv=none; d=google.com; s=arc-20160816; b=ZFEpY+tB4gu6KOKDWsrVcVifdxqdJbQ7150KrSQVRC7bU1rh+/SEKrSKJp6TYBCSdz HBItXpB+Ykqv53AhmunZH6RRTOMBlIa3GAtZTbx5g0IsRN85VY5YwqhYpMmyvBIBxqVX FJ6bRVjKdnGzrRlvSya3c2xOlRjS11sP6dlip06h7SNmSU7xgTV2RWFVf5BvUMlJJALf 9otBCI4do7CArcxTsCX7NbmntPjyZlbkxBrSJmgxoZs7UjY8EEourKBdqcWLmgOZzQ/0 d7e2SDC3V7VZ2BGxHh83HGFxTCg9mE/woPSCoTibv6K6EnYKJiXufQ2qD/WOu/t/XXFx EuFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=MW31G5kbLu7/Ci0H2MhhDew+fQAgETw4RoigY7kMdHg=; b=BW0PiIXw/7hf77o8ahkvkeUUGfobY4Lqk/dsgg05GLqnXHBiAhuguscY6bUN3Ecq4Z rlJVPFJVveR2Tc+AIyZzeFP+lGe7keSj0wuvlkP3bxUGMuEpChfaZiI1FmFpGZKdoEa0 9rZv3YxqWOTk3RZCt9UvDkbQCmGUztrSPfnjtpaIEVz4sW/QqBHBq1ED7GTfgmAnbxO4 O0g7KVAYpS3QvGjRBkhNxXILNGcVfjQ5gC06bgLMVZpqdA+1Ttg6/gsV9wNiHLjQLHU+ RVKyeWyozLQj4/VkOZSV5t+LkTax5jY56/h0uP6ms4FMCCLYvrzfx3zSUmWwe490pIIP FO5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=XDBfijn0; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs23-20020a1709073e9700b00715a028661asi4008899ejc.345.2022.06.21.15.05.47; Tue, 21 Jun 2022 15:06:15 -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=@linutronix.de header.s=2020 header.b=XDBfijn0; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355019AbiFUVrt (ORCPT + 99 others); Tue, 21 Jun 2022 17:47:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345358AbiFUVrr (ORCPT ); Tue, 21 Jun 2022 17:47:47 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33DBA186E1 for ; Tue, 21 Jun 2022 14:47:47 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1655848065; 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=MW31G5kbLu7/Ci0H2MhhDew+fQAgETw4RoigY7kMdHg=; b=XDBfijn0gdcFhbScEOcVU21nKf/td+AsNM2biCOYygacdDxoAJwlaYC3i4lAJUwVIbl59Z Y7XFJ51Xt4ocAQk5T43Nh0WKqIgNGlaJRmDWqgAz7fkLSJk5h46BI90fhi/SsBjwUPakXi XELp0SGBxFqUrIeJb1PArKIsHoJThxp5fbErz6X8tKlriCTSqeOING9LztUr7KGuhRaLHf ERuE/N/rWVFsCvImB2T2gZPSWlRRGkVCLPGZdwHBHJDtmfTnTneBXgPhRaRVf0Eg3v0l1R tlgAAJSQDoWU6nAR5dXughhiH6pPdo7xGnTtZGEf0ta8f/ZUpI2t/8cMY7Sz4A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1655848065; 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=MW31G5kbLu7/Ci0H2MhhDew+fQAgETw4RoigY7kMdHg=; b=reFnj+hQ8X0HNAgyXwNbv8GWk81hcdrqWxrZ71D00HbfBDtrheru8sdeIBDhJCUCE/udWG QeSgrlQQgahjp4CA== To: Sergey Senozhatsky Cc: "Jason A. Donenfeld" , Petr Mladek , Marco Elver , linux-kernel@vger.kernel.org, Sergey Senozhatsky , Steven Rostedt Subject: Re: [PATCH v2] printk: allow direct console printing to be enabled always In-Reply-To: References: <20220619204326.556923-1-Jason@zx2c4.com> <87letsw8en.fsf@jogness.linutronix.de> Date: Tue, 21 Jun 2022 23:53:44 +0206 Message-ID: <875yktadtr.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 2022-06-20, Sergey Senozhatsky wrote: > would it make sense/be possible/etc. to look into possibility > to address that "deferred kthread vs IRQ" race by moving prb entries > emit to the same IRQ handler that emits chars from uart xmit buffer? I think this is an interesting idea. We could have a function that would allow serial drivers (if they had a console on them) to flush any pending printk messages for their console. Each driver would need to call this function for themselves. And also the driver would need to ensure that it is not holding any locks that the console-part of the driver will need. And it would need to be best effort, because the related kthread may already be in the process of printing. But in general I think it could be a nice feature to improve the sort-of-synchronous behavior of printk for drivers that use it. John Ogness