Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp11286rdb; Fri, 29 Sep 2023 14:47:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeo7JOFycx+YqOzesblHHXYSLM0osWajy1egStL5oIBhA8J0ILlUtzXL02qYV7BvfUL4wx X-Received: by 2002:a05:6a00:1823:b0:692:b6e8:ce88 with SMTP id y35-20020a056a00182300b00692b6e8ce88mr5854661pfa.17.1696024035918; Fri, 29 Sep 2023 14:47:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696024035; cv=none; d=google.com; s=arc-20160816; b=zsqqNFfifEABrUxTinh6IkBBdIqmGKtm40b+LlRF3bnQnd63VgAypALdDljCzgFOX5 lrwyBziFJ8YSMC10F5pP+5P1BY82XP0YFXU/LMV1/2lvBFFrDetGW7V7VzgbcMRDN0Om QX9xDOvXvlHBoxOtQkPPpAo5MZyw63MwNAbn9kCn6P49FYULhMNIL5BSCKiTsyRoj7+8 cJYlzwYgtwPQ47qpHdQP8+5DBzfS+phsFtK9kPRLAwH55gXVV43zUqtgKxUVjZb0p3Vj n7jAP0BpWiPbOvVwWw5lq2ja5cqCk328fqCJaRVTc1ZNHKgQcBOEeT3AflH8nYeA/X5f mmGQ== 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=E79DK7BozeB99z07tZdUghJDpaK72+RIh6GRzFcwuPo=; fh=3blkj9jwkcxpO2El+FNh4zbUYhaV0kFaIYqDZjm/Wn4=; b=PaqAjCiEiOQIDuEV9zuglHmLUkM2dyjgeXad/vJS866j7mV3C+NbuHGMcP75dfgvGQ 4ATcUZSVdpFLDwCespGT1AHrRbRBUoUD45oaRm+/QgO7VwhRtaPiviAgJ5BburE+GHGt 2hw62niLu8znYz1eqMm+QX14CQA/eh4MZlxdbB2cCFTfkCeMjZDoj7LUeFR/yDf4iqLr N6z49xS6eJwjj72nF1iLnV+01oJdf2lmaDmkAIJhLX3X5N0GmwSyZ78+p45v56YnWxgp Yckm9R8JluTsMtV2WVtHDNX7n/MKNg7B82If/a0Kcl/DcdBWioDIx/llTaS2RKfZkqu2 lntg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=EDY6DiJQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bk13-20020a056a02028d00b00578b76eff9bsi21621526pgb.379.2023.09.29.14.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 14:47:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=EDY6DiJQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8022C80E65BD; Fri, 29 Sep 2023 06:43:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233266AbjI2NnO (ORCPT + 99 others); Fri, 29 Sep 2023 09:43:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232997AbjI2NnN (ORCPT ); Fri, 29 Sep 2023 09:43:13 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DDB41AB for ; Fri, 29 Sep 2023 06:43:09 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 0B7491F45E; Fri, 29 Sep 2023 13:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1695994988; 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=E79DK7BozeB99z07tZdUghJDpaK72+RIh6GRzFcwuPo=; b=EDY6DiJQShnQc+6wCGRGVJN8DGvd3ZTNQZysEh1SwDkNsOSEbIhJGotrAfsM4to27GT41B km0L2IOYaJh7VE4XoN2RCb4oecwwmugAJz+M1rVtfOX77f8vJEdxkAtvKNnorB4R+d+/qv plGwSG7HHIStZyVB6y5KPVB7ywjoodM= Received: from suse.cz (pmladek.udp.ovpn2.prg.suse.de [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 605652C142; Fri, 29 Sep 2023 13:43:07 +0000 (UTC) Date: Fri, 29 Sep 2023 15:43:06 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Todd Brandt Subject: Re: [PATCH printk] printk: flush consoles before checking progress Message-ID: References: <20230929113233.863824-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230929113233.863824-1-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 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 29 Sep 2023 06:43:16 -0700 (PDT) On Fri 2023-09-29 13:38:33, John Ogness wrote: > Commit 9e70a5e109a4 ("printk: Add per-console suspended state") > removed console lock usage during resume and replaced it with > the clearly defined console_list_lock and srcu mechanisms. > > However, the console lock usage had an important side-effect > of flushing the consoles. After its removal, consoles were no > longer flushed before checking their progress. > > Add the console_lock/console_unlock dance to the beginning > of __pr_flush() to actually flush the consoles before checking > their progress. Also add comments to clarify this additional > usage of the console lock. > > Finally, in case pr_flush() needs to poll-wait (for example, > because there has been a handover to another CPU), reduce the > polling interval from 100ms to 1ms. In the bug report it was > mentioned that 100ms is unnecessarily long. > > Reported-by: Todd Brandt > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217955 > Fixes: 9e70a5e109a4 ("printk: Add per-console suspended state") > Signed-off-by: John Ogness Looks good to me: Reviewed-by: Petr Mladek I am going to wait a bit for eventual feedback and push it to linux-next the following week. Best Regards, Petr