From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C090AC4332F for ; Fri, 25 Nov 2022 20:01:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229554AbiKYUBy convert rfc822-to-8bit (ORCPT ); Fri, 25 Nov 2022 15:01:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229937AbiKYUBu (ORCPT ); Fri, 25 Nov 2022 15:01:50 -0500 X-Greylist: delayed 466 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 25 Nov 2022 12:01:45 PST Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06F6F56575 for ; Fri, 25 Nov 2022 12:01:44 -0800 (PST) Received: from omf01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 060BDC0A50; Fri, 25 Nov 2022 19:53:55 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA id DE61F60013; Fri, 25 Nov 2022 19:53:52 +0000 (UTC) Message-ID: Subject: Re: [PATCH v2 3/3] power: process: use explicit levels for printk continuations From: Joe Perches To: Thomas =?ISO-8859-1?Q?Wei=DFschuh?= , "Rafael J. Wysocki" , Pavel Machek , Len Brown , linux-pm@vger.kernel.org, Petr Mladek , Sergey Senozhatsky , Andy Whitcroft Cc: linux-kernel@vger.kernel.org, Steven Rostedt , Dwaipayan Ray , Lukas Bulwahn Date: Fri, 25 Nov 2022 11:53:49 -0800 In-Reply-To: <20221125190948.2062-4-linux@weissschuh.net> References: <20221125190948.2062-1-linux@weissschuh.net> <20221125190948.2062-4-linux@weissschuh.net> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Stat-Signature: f8ui8jy95g9mn1bsc6oyscfzb5tx637o X-Rspamd-Server: rspamout05 X-Rspamd-Queue-Id: DE61F60013 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18HCohEpzJ2JMwVne5Qiy/X+ULGtNKt0DI= X-HE-Tag: 1669406032-894572 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Fri, 2022-11-25 at 20:09 +0100, Thomas Weißschuh wrote: > Many of the printk messages emitted during suspend and resume are > emitted in fragments using pr_cont()/KERN_CONT. > > As during suspend and resume a lot of operations are happing in the > kernel the chances are high that the fragments are interspersed with > unrelated messages. > > In this case if no explicit level is specified for the fragments the > standard level is applied, which by default is KERN_WARNING. > > If the user is only observing KERN_WARNING and *not* KERN_INFO messages > they will see incomplete message fragments. > > By specifing the correct printk level also with the continuations this > mismatch can be avoided. > Also it reduces the amount of false-positive KERN_WARNING messages. > > Signed-off-by: Thomas Weißschuh > --- > kernel/power/process.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/kernel/power/process.c b/kernel/power/process.c [] > @@ -82,7 +82,7 @@ static int try_to_freeze_tasks(bool user_only) > elapsed_msecs = ktime_to_ms(elapsed); > > if (todo) { > - pr_cont("\n"); > + pr_info_cont("\n"); I think this isn't needed because of the immediately following pr_err. > pr_err("Freezing of tasks %s after %d.%03d seconds " > "(%d tasks refusing to freeze, wq_busy=%d):\n", > wakeup ? "aborted" : "failed",