Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2427126rwb; Wed, 30 Nov 2022 06:33:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf58Wkv7mlWBRTflef742p9q4570KrbRw5hNS6B2s4jzDj+Ni1lvPgNt/rn89c1xvG0sMOrv X-Received: by 2002:a63:1c66:0:b0:476:c782:e5d1 with SMTP id c38-20020a631c66000000b00476c782e5d1mr35905363pgm.261.1669818781300; Wed, 30 Nov 2022 06:33:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669818781; cv=none; d=google.com; s=arc-20160816; b=fu0Mikis08hplZCdSmocDybfukBpYSO5ZZOol5RUZmULT6ZPZ6XEyGwjPO22+4qxmL hekLzdvjUU14DSSNPNlFUAU+wNvAuShkrT+vW7jQ+qDPwyRlKJi8gEoKmh4UzLq5iqCI S1aDocX4xDREZoIMOuiyrCeI3b6mZo1pnZSiIUOJn7HDLE95Vp3ObdvHI3q41MscOIE0 DmuLj0KvBVjqIr5ZW4FVaZqz1oEm96o5wtf2UXy2czpDca+xO/De2fHJHVV7YpIqOOX4 PbaFCYi6gOZJFCklooih9QvE5jZ+2Y1hYW1uXAi+HmupMRsaCfUwxn7FiIrhSPeNXLLO yxjA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BmWydEyxVCtO1F3KxVGX1dvHBxkV4Dnqpc/owJqFkOE=; b=tm8Ma364EuH7CPAtnIdEJRUj24foKw4NGS5BgSAIYTrf+6uVWgX8x+rnYKV/e1Q0G+ 6NBwknIy/Fe2Y5WJk0H6grjSXuT4VimYUyGenj9IsFKD14+URVn+pHOz/y3tlLdlfMwY 0jyLm3Ku8i8QfDk8GYc2y9Nq6VrgsdtZme3MG1HGNikhhjDVDDHatkdL62P0iJ/eRrys 4kA9ZVlv82+3Nwq9uS66c+Nun/VN70hzyrRYX4nXHztY7NQIOl/XfC4DhTYbnndAHL+A /JQygbnWQopw8ssfbM+M6lS1Xg8YaJoeQwMahgK8mhfk/TeCg/xyOnbDRvWANbsx5Ybg KSFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=fzTGWCen; 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 d16-20020a056a00245000b0056bbdb48fcdsi1928792pfj.118.2022.11.30.06.32.49; Wed, 30 Nov 2022 06:33:01 -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=pass header.i=@suse.com header.s=susede1 header.b=fzTGWCen; 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 S230214AbiK3N7T (ORCPT + 85 others); Wed, 30 Nov 2022 08:59:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiK3N7S (ORCPT ); Wed, 30 Nov 2022 08:59:18 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B58B29815; Wed, 30 Nov 2022 05:59:17 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 283651F8D4; Wed, 30 Nov 2022 13:59:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1669816756; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BmWydEyxVCtO1F3KxVGX1dvHBxkV4Dnqpc/owJqFkOE=; b=fzTGWCena/BFQ2Eq38B1LD+fqh7nkLAlqycR5BkW4pQjnxHB/In1wZAF2Dt4lioNX0URY2 JqTNokmchp/RHmF8o1DQsGN4f84+GHA+Oa+LQL2nvAU2ABh+3b2n7zCTY0Z7mI/7rmyKQO QOniOTv1QYfiaAvRq/1kEIGZ2Ke0agk= Received: from suse.cz (unknown [10.100.208.146]) (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 B8F0E2C152; Wed, 30 Nov 2022 13:59:15 +0000 (UTC) Date: Wed, 30 Nov 2022 14:59:15 +0100 From: Petr Mladek To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Joe Perches , "Rafael J. Wysocki" , Pavel Machek , Len Brown , linux-pm@vger.kernel.org, Sergey Senozhatsky , Andy Whitcroft , linux-kernel@vger.kernel.org, Steven Rostedt , Dwaipayan Ray , Lukas Bulwahn Subject: Re: [PATCH v2 1/3] printk: introduce new macros pr__cont() Message-ID: References: <20221125190948.2062-1-linux@weissschuh.net> <20221125190948.2062-2-linux@weissschuh.net> <1fb146231e1810b4c9923f384afa166e07e7f253.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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-11-25 21:33:40, Thomas Wei?schuh wrote: > On 2022-11-25 12:18-0800, Joe Perches wrote: > > On Fri, 2022-11-25 at 20:09 +0100, Thomas Wei?schuh wrote: > >> These macros emit continuation messages with explicit levels. > >> In case the continuation is logged separately from the original message > >> it will retain its level instead of falling back to KERN_DEFAULT. > >> > >> This remedies the issue that logs filtered by level contain stray > >> continuation messages without context. > >> > >> --- a/include/linux/printk.h > >> +++ b/include/linux/printk.h > >> @@ -701,6 +703,27 @@ do { \ > >> no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) > >> #endif > >> > >> +/* > >> + * Print a continuation message with level. In case the continuation is split > >> + * from the main message it preserves the level. > >> + */ > >> + > >> +#define pr_emerg_cont(fmt, ...) \ > >> + printk(KERN_EMERG KERN_CONT pr_fmt(fmt), ##__VA_ARGS__) > > > > Aren't this rather backwards? > > KERN_CONT KERN_ seems to make more sense to me. > > If nobody else disagrees I'll do this for v3. I slightly prefer the way how it is now. IMHO, it makes it easier to check the related levels in /sys/kernel/debug/printk/index/vmlinux [*]: <6> kernel/power/process.c:227 thaw_kernel_threads "Restarting kernel threads ... " <6,c> kernel/power/process.c:218 thaw_processes "done.\n" <6> kernel/power/process.c:197 thaw_processes "Restarting tasks ... " <6,c> kernel/power/process.c:176 freeze_kernel_threads "\n" <6,c> kernel/power/process.c:174 freeze_kernel_threads "done." <6> kernel/power/process.c:169 freeze_kernel_threads "Freezing remaining freezable tasks ... " <6,c> kernel/power/process.c:140 freeze_processes "\n" <6,c> kernel/power/process.c:138 freeze_processes "done." <6> kernel/power/process.c:133 freeze_processes "Freezing user space processes ... " <6,c> kernel/power/process.c:105 try_to_freeze_tasks "(elapsed %d.%03d seconds) " That said, I do not want to fight over it. It is hidden behind the API. The only really visible place is the printk index. [*] The index is available only when CONFIG_PRINTK_INDEX is enabled. Best Regards, Petr