Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp997156imw; Wed, 13 Jul 2022 11:50:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tN1m0B1iFFLfOHaTUyh/elLs7j6p8SM0xOv6ZWEvGVdtIgt5R9Pr8d08jjozd2iHjlrVXF X-Received: by 2002:aa7:80ce:0:b0:529:5e4f:7f67 with SMTP id a14-20020aa780ce000000b005295e4f7f67mr4451336pfn.3.1657738258398; Wed, 13 Jul 2022 11:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657738258; cv=none; d=google.com; s=arc-20160816; b=a0CITp+ORNfIPgDjxfcENSf5oVgD4wpNqg+rMjpRV8kuWJnmgLQMgNBgmOKpCXR5bQ u724ponF6uaFXYwuopz/c8480LMb75qOTemtQ6gBhLDzintbCJycply8M/5G8e/1RJbe tuVzl4UsGjRD9NsVX+pfbp7xSdHj9DuKpb3ZEpi6USzZ8ZPInxiNzdTugiy2YGG97Gag RgYmvn2WwBuzB1HSd/R8SDZhyP+ucy/WhV4CBeaQSVPZi4d05xLbRwL0RmroY2K5XDF8 eUB9nV0SEuXmfng0uf7hQCHZ10aL/iwpcO34d7jA/iKpukGQBYjfOr2jbr3kQeL9xo4I PMdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:reply-to:from:subject:message-id :dkim-signature; bh=QDD2Fniw5BzvbIh7WQy4dBinRn8N/U6UJNN3i6+67D8=; b=undvjNfZ2xYOzD6Xu30uH8xsiMf1c/2+So2xS9lVH9RSiwkdWmZAoZbzB8+BEK39Hk ZeDP3d7vopeOLp3ULNKCxp7KQHXU3IbnJcpJjlYex7hxsQ5GneXCbc30G1p6upXdmVkg kvVFh5HndIv59PrLERz1h+bKK9Yt5wjNh4h42shoHQveUQ78RFQua4L1NJoPZAweIxfP Oodp/Mj6HfNnyLBSBsHDg7ADsoT7UIMBGphCQ322xmw3JdrSSrcZSoclRl6zSVc4y8HB f9ySu3H5edbODT0r+KxclCTpnZaWW7977c+8A+DkpXi6IBR4UISICmZ3YYhCpO/3EYKs OOEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="cI/2c444"; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020a170902ccc900b0016c2d91da3csi18744349ple.126.2022.07.13.11.50.46; Wed, 13 Jul 2022 11:50:58 -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=@intel.com header.s=Intel header.b="cI/2c444"; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236635AbiGMSYB (ORCPT + 99 others); Wed, 13 Jul 2022 14:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231754AbiGMSYA (ORCPT ); Wed, 13 Jul 2022 14:24:00 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C8E3183A9; Wed, 13 Jul 2022 11:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657736639; x=1689272639; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=/GFwjk0WDlWHLT5scE0PrSHapMgZnVgphn1v3cLSw9A=; b=cI/2c4443pjmTyyFEGXDlkXtjTN4oJI/qkUqbOFgvjJzMlX4kL4De6t5 kGNhZD+mnTeXs+hTWFU4mkHOmI0hNG4tVe+51ChrRGaFZZMks7NSuNfMI BMFrZvzZxqCyUNIfFkSlbbT4JhlezgUpDxvAvfPbn66Z1ciyl9TABTCez E/PTYIaz6yuJ2TcjzUUEt5WdhY+U/LiOMdWK0yGm8oDnSSqUmoVExvXeR lcd7/YEG1I3r/NhLbIvak9K8Vyu1jZ5V6+Vrj1CvX6Zn6e/W7Lpnz/RI5 +woQVMAhRGSlwm5NH3sq/tb70R7IMJtjTyiiX0H4cha7JhP2VGZ7rMUU/ w==; X-IronPort-AV: E=McAfee;i="6400,9594,10407"; a="310955144" X-IronPort-AV: E=Sophos;i="5.92,267,1650956400"; d="scan'208";a="310955144" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2022 11:23:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,267,1650956400"; d="scan'208";a="623074034" Received: from wopr.jf.intel.com ([10.54.75.125]) by orsmga008.jf.intel.com with ESMTP; 13 Jul 2022 11:23:58 -0700 Message-ID: <7d79e9877d63cdb74144f38d8736959281b562cc.camel@linux.intel.com> Subject: Re: PNP0501 serial driver takes almost 2 seconds to suspend/resume (printk issue) From: Todd Brandt Reply-To: todd.e.brandt@linux.intel.com To: John Ogness , Sergey Senozhatsky , Petr Mladek , rafael.j.wysocki@intel.com, len.brown@intel.com Cc: Andy Shevchenko , Linux Kernel Mailing List , "open list:SERIAL DRIVERS" , Steven Rostedt Date: Wed, 13 Jul 2022 11:23:58 -0700 In-Reply-To: References: <12fb98fe27e23e3f74a139e5e8eb83a97a343372.camel@linux.intel.com> <51b9e2cc3baf61a604bd239b736ec2d12f1f6695.camel@linux.intel.com> <87czegxccb.fsf@jogness.linutronix.de> <045ebee30af2b80aaeace1dab18ecd113e3f17c7.camel@linux.intel.com> <87tu7qvx1q.fsf@jogness.linutronix.de> <87o7xwbuoy.fsf@jogness.linutronix.de> <87ilo1wdac.fsf@jogness.linutronix.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 URGENT: Removing the commit FIXES the issue. I just ran a 5.19.0-rc6 kernel with the offending commit removed and it fixed the problem completely on all 3 machines. To be clear the offending commit is: commit 3b604ca81202eea2a917eb6491e90f610fba0ec7 I strongly recommend that this commit be pulled (or fixed very quickly) before the 5.19 release or 1 in 10 linux machines running 5.19 will take up to 2 seconds longer in suspend/resume. commit 3b604ca81202eea2a917eb6491e90f610fba0ec7 Author: John Ogness Date: Thu Apr 21 23:28:46 2022 +0206 printk: add pr_flush() Provide a might-sleep function to allow waiting for console printers to catch up to the latest logged message. Use pr_flush() whenever it is desirable to get buffered messages printed before continuing: suspend_console(), resume_console(), console_stop(), console_start(), console_unblank(). Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20220421212250.565456-12-john.ogness@linutronix.de include/linux/printk.h | 7 +++++ kernel/printk/printk.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) On Wed, 2022-07-13 at 10:11 -0700, Todd Brandt wrote: > I've updated the bugzilla entry with new data: > https://bugzilla.kernel.org/show_bug.cgi?id=216216 > > I just added 3 new tests for 5.19.0-rc6 on 3 machines that see this > issue: otcpl-asus-e200-cht (cherry trail), otcpl-aml-y (amber lake), > and otcpl-whl-u (whiskey lake). The kernel has the > CONFIG_PRINTK_CALLER > option enabled. > > The test is a S2idle and is run thusly: > %> sleepgraph -dev -m freeze -rtcwake 15 > > I've included the dmesg boot logs for all three. The dmesg > suspend/resume logs are included in the html timelines by clicking > the > "dmesg" button in the upper right hand corner of the timeline. > There's > a "log" button as well that shows other system into. > > These files are attached to the bugzilla entry. > otcpl-aml-y-5.19.0-rc6-boot-dmesg.txt > otcpl-aml-y-5.19.0-rc6-freeze.html > otcpl-asus-e200-cht-5.19.0-rc6-boot-dmesg.txt > otcpl-asus-e200-cht-5.19.0-rc6-freeze.html > otcpl-whl-u-5.19.0-rc6-boot-dmesg.txt > otcpl-whl-u-5.19.0-rc6-freeze.html > > If possible can we move this thread to the bugzilla comment section? > > > On Wed, 2022-07-13 at 11:57 +0206, John Ogness wrote: > > On 2022-07-11, Sergey Senozhatsky wrote: > > > > It seems that __pr_flush() does not check whether all consoles > > > > are > > > > suspended. In this case the progress is not possible and it has > > > > to > > > > wait the entire timeout. > > > > > > But isn't console_suspended set after pr_flush() call? > > > > There should not be any printing after the suspend_console() > > message. > > If > > Todd's report is coming from 5.19-rc1, then it is likely a kthread > > issue, where the kthread is not respecting @console_suspended. > > (This > > would still need to be fixed for the kthreads, but would not be > > relevant > > for 5.19.) > > > > John