Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp252103imw; Fri, 15 Jul 2022 02:26:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uUG00FrXrD5p/mxGU+xByhrig2Sh6vdm1B4mWpTSW3mIqqnPScVRtfejt6J7pjlEQrxs5N X-Received: by 2002:a17:907:2cc8:b0:72b:7c72:e6a4 with SMTP id hg8-20020a1709072cc800b0072b7c72e6a4mr13191977ejc.160.1657877191464; Fri, 15 Jul 2022 02:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657877191; cv=none; d=google.com; s=arc-20160816; b=wraJEIAxxBBcPezNdMv+RRekNrWO09G3K96GND+qqbjqXC/YJY6rOmq4YEcxaBpiT9 CtJT7qT7pIUAFVrqdrKfP+mEQaeMik7zT9QnHjExiDL7G7XyKc3+1+mXeb3RU3GvU4mY QSI9W2k+BqTTJjd2nWkj1dSBjNWGp3inlbxOCExnNfTCjRvUZW2AzPPEUAHMcfXa/Tio ALiPY0T4iaWfeVC9RsMk4LHzdnDeHyJ30RKAznW+DwKxd/96AFi3Ox7v5i3xfJTnwAML hj7Sp7hRDwysHD3ETZID7vJcE0SgDL0M6dAw99bsCEIaFA7tvliARcgiFEXLOvynwtDQ 1+kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=H11xd9RiwcHM8/pUTz7ymtF6A03GOByxCIR1ZLzFjSs=; b=sX7VklJUWv0FFYMj9Ca108ZUB0BgghUEJIjWNL8E/rwz6lpjWM5RD4giIKTMlk3M9P hIRRDLG0mnQ7NcY3ethnJZEMHMXBIQR22vwNib5WW91WLeLGpVUG1DOiT2bumiWQYvMb ruI2AyFUx5eZXoPwGGDoDSo8N1PwsMrgmKDAKQj1Z/GPBJckzbj/2tUB+2C2g+PFBogp KJeFTTL1gxoJYZpg1JbadtOZk+3cY3rrqtjY5/0kdY2JoqTuywgfvwhr0vOdECHAeZi/ U3pMQ2mcdpNd2+jxyPIeU/RzyiRr5Y0xUzJPIsamR2/hJ9RbBO3OpbjOKdUUdO6mIBlZ Qt5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=nJYDbJFt; 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 k2-20020a50ce42000000b00435672e061esi3875711edj.488.2022.07.15.02.26.07; Fri, 15 Jul 2022 02:26:31 -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=nJYDbJFt; 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 S233147AbiGOJQN (ORCPT + 99 others); Fri, 15 Jul 2022 05:16:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233688AbiGOJP0 (ORCPT ); Fri, 15 Jul 2022 05:15:26 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73EC25B7AD for ; Fri, 15 Jul 2022 02:14:16 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id B1FA333AF3; Fri, 15 Jul 2022 09:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1657876454; 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=H11xd9RiwcHM8/pUTz7ymtF6A03GOByxCIR1ZLzFjSs=; b=nJYDbJFtZ/G68D5T1IS0mEbrBeduiWgwYOP9o2jjcy4ki1lEpfbg1cbb/pfF7VRc9/gAkr WkOymkTR7mtkBgJXsyb2fQvTOnAg8Gm/P+eFLcbrUh1f09rZ57pWmcfPBMI21TZbfCpsa3 XxAoGbhRvRrI0WKQyu4NFQwK1naOiBc= Received: from suse.cz (pathway.suse.cz [10.100.12.24]) (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 639A92C141; Fri, 15 Jul 2022 09:14:14 +0000 (UTC) Date: Fri, 15 Jul 2022 11:14:14 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org, Todd Brandt Subject: Re: [PATCH v3] printk: do not wait for consoles when suspended Message-ID: <20220715091413.GC24338@pathway.suse.cz> References: <20220715061042.373640-1-john.ogness@linutronix.de> <20220715061042.373640-2-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220715061042.373640-2-john.ogness@linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) 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 On Fri 2022-07-15 08:16:42, John Ogness wrote: > The console_stop() and console_start() functions call pr_flush(). > When suspending, these functions are called by the serial subsystem > while the serial port is suspended. In this scenario, if there are > any pending messages, a call to pr_flush() will always result in a > timeout because the serial port cannot make forward progress. This > causes longer suspend and resume times. > > Add a check in pr_flush() so that it will immediately timeout if > the consoles are suspended. > > Fixes: 3b604ca81202 ("printk: add pr_flush()") > Reported-by: Todd Brandt > Signed-off-by: John Ogness > Tested-by: Todd Brandt The patch is committed in printk/linux.git, branch rework/kthreads. I think about creating pull request for 5.19 later today or tomorrow so that it is in the last rc. Best Regards, Petr