Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp11272744rwb; Fri, 25 Nov 2022 13:22:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf77q46XJ/AO9oaSvk5Jss7nUJeRTJS1009eckRbxKMUdZNUpxBsHuIam2//DCF4NP4jUTi3 X-Received: by 2002:a05:6a02:108:b0:46b:3acb:77ab with SMTP id bg8-20020a056a02010800b0046b3acb77abmr17373000pgb.359.1669411325381; Fri, 25 Nov 2022 13:22:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669411325; cv=none; d=google.com; s=arc-20160816; b=RYBVBIBOcgzBlHLZb2L3e3qQRFvYp5J0k1/D++sfssl9DU8Q8QPCD+p/H2SQi9No7D lVk7Y0xe0/mheKmexAhb2hPgqFgw/kvY0MrmZbhifG730AAYuvtliNnJ+a5IpEmL9Hlf +zCZWkwIuNvjmLLwjjrKi6WHmKmLKatonFLseGdB7rZ9TgG3M56Y3rp1MoCki2i8erP2 sUU3LitXxADPwrdmHmCt4vBl3kO5U+9gz43HqcbiQdQm0vQCBI54kitAJcV69pbD4Xwt dp7yYw4gI0s01ADvNT9hTjyzDWj/b3CPc1Ike/YbNcKvnHzLW0jnOPYemKURLnsA5GyC YKnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:jabber-id:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=BMTiIiwX5HTgyEf3KI+BRKYha3wa6t8gvP5Xl8MGSoc=; b=HP4DWIupX0INFPsL7lyBp8zKSyDe4mSooSqvpXme++VWLBoOeNVHAmpHugnZFp08V9 MJL2wGCE76U4OEn2hqhPSmEDCl2zLMMwkd4b9oxI8g7NH5nbzEwwtQxV1Qc7TVQqoR80 B5noQf4NeMyTP34Xuu+/cgdQhzGz7v3NXE1OJ9y0QidrAhXwsve2UvO2rJVwQitu6jZd 955alLBSv4U1r7U0tlms7ttIhG3pcIAqbqupFD+dBU3XxSvW7H+qnd5aAvlRwOoiB+JC /Uk056pz9xNcsnRRtcVTf1uJwPPmoTfXskaEFliFY5MuvbyzLNn+D5AXdIh5vh9HdWyz 9rdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=gyUFxGm8; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jj9-20020a170903048900b0018956e3ff71si4266251plb.473.2022.11.25.13.21.49; Fri, 25 Nov 2022 13:22:05 -0800 (PST) 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=fail header.i=@weissschuh.net header.s=mail header.b=gyUFxGm8; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbiKYUmM (ORCPT + 85 others); Fri, 25 Nov 2022 15:42:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbiKYUmK (ORCPT ); Fri, 25 Nov 2022 15:42:10 -0500 X-Greylist: delayed 5516 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 25 Nov 2022 12:42:09 PST Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B417640470; Fri, 25 Nov 2022 12:42:09 -0800 (PST) Date: Fri, 25 Nov 2022 21:41:55 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1669408927; bh=xOpKZV4KGwVSKzHLFLhNwRNb9SsL9WyN7q5smyNEhc4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gyUFxGm82aNHvTIOKlAqj9WavGvQ2+8kUgTfMf+9VSFYTmfhzbvZ40R/b5OTFQ/8x Cg19gu/hGT2AfMH8Hm4YIpy+4scnBrcuMggrK6QdWsZr6DWDPApccj0xTlZnK8i5OR 3JePZzVhF7xW4kk0gXQxA0bIGNCJa900RaIanCgM= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Joe Perches Cc: "Rafael J. Wysocki" , Pavel Machek , Len Brown , linux-pm@vger.kernel.org, Petr Mladek , Sergey Senozhatsky , Andy Whitcroft , linux-kernel@vger.kernel.org, Steven Rostedt , Dwaipayan Ray , Lukas Bulwahn Subject: Re: [PATCH v2 3/3] power: process: use explicit levels for printk continuations Message-ID: References: <20221125190948.2062-1-linux@weissschuh.net> <20221125190948.2062-4-linux@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Jabber-ID: thomas@t-8ch.de X-Accept: text/plain, text/html;q=0.2, text/*;q=0.1 X-Accept-Language: en-us, en;q=0.8, de-de;q=0.7, de;q=0.6 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 2022-11-25 11:53-0800, Joe Perches wrote: > 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. The pr_cont() itself or the conversion to pr_info_cont() is not needed? Personally I would prefer to keep the patch as is. If only the conversion is not needed for consistency with the rest of the file. If the pr_cont() in general is not needed it should be changed in a dedicated patch (by somebody who knows this code better). >> pr_err("Freezing of tasks %s after %d.%03d seconds " >> "(%d tasks refusing to freeze, wq_busy=%d):\n", >> wakeup ? "aborted" : "failed", >