Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp77410pxh; Thu, 7 Apr 2022 14:31:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGw+lym/ghMutsra8tC53tQcntD2nZRPScgubtpl40tuQ9mDoW/P+cgotIrMN76BEsnZVc X-Received: by 2002:a63:4f46:0:b0:382:56b2:f8 with SMTP id p6-20020a634f46000000b0038256b200f8mr12870720pgl.90.1649367065455; Thu, 07 Apr 2022 14:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649367065; cv=none; d=google.com; s=arc-20160816; b=q2vFJYkJDqjLOACVsAL/CSLAFL99A28rKn0BS/7+xkUO2ORKGH9QlaLGt1rD35b/co aGRFaoz/xEpDzcZV4YHm1ZI+EthyWe2iQtlILlxUC3ce6Cxbd83H3YU9OlMsacWcr3mG U8BM1ilwpZ9GKrplQre1KwZ/sohyUzNlHmRrajsWGqBd/gDbEKT6EMadlaUIUrqKyDmK ppD2nJFAXn0P06iByN6bmr+clWAh0bzjkCvTQpFeoiRNSpAJOzoylayyJFiT7qXADmAF xZwIMII0pMIkrrBBmm8CEmf8/fE61XPZYDzbeu4wFDHYNxVmNhUcUzadqD+TFrZMApRf nPaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ImyuGelXfK/3By3p0LZU4LiBApMy/j1Ptb46Jf+Biz4=; b=r0oNGzZhe84y/XWQESGq1r7BCGe8E52fFU3zfpLA1YaSpK4TSH4gVXQaDWuDrnt53V H7ft7PMZ1s4i1ic5S50+IqNVeI5OmUkke+dAQJ/UlAyYiUb66z81KNsv4skakcJ/PAeC pYKVpSkFGkwOfAq+dsZKCfgsj7xskeBZLPzbJSBgFXBotwEUjhFI5tCZdlwik/jLXyDi 6l9RCnUg0U4Ji53GiGJPFls9EDB/zb+K4GwgxiXTNL8JylpEekf7J5aaw9zLze8ut8LH gx8w2h7aP0t3PH5gWE9FA7O+617atAJiDBWAYZbdgnVMDGDuEB1kkyF4k2luOrG0u07T /lOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="TxSy/35d"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x17-20020a63db51000000b003816043ee55si20630956pgi.74.2022.04.07.14.31.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 14:31:05 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="TxSy/35d"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 493D9366E6F; Thu, 7 Apr 2022 13:36:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230029AbiDGUiS (ORCPT + 99 others); Thu, 7 Apr 2022 16:38:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230258AbiDGUhX (ORCPT ); Thu, 7 Apr 2022 16:37:23 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23259364786; Thu, 7 Apr 2022 13:24:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1649362938; bh=ImyuGelXfK/3By3p0LZU4LiBApMy/j1Ptb46Jf+Biz4=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=TxSy/35dCJSdh0sNIk3fkYh/1dlFujjV9D56JtFQQ12mUp9apitJjLS3+XYD2mjda hnXY87qQIw3165Dc9upLAl+xAIrjazLtkLrCBKqMwQxeefR89hpEU0tTuv2rLtwcPP wGlK1KTU8a5Km0Ze1pEINc4FODSQGAPwukPD2gFE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.20.60] ([92.116.161.122]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mw9QC-1nt7Wf32ea-00s8YX; Thu, 07 Apr 2022 22:22:17 +0200 Message-ID: <4bcfd2b3-66fd-c5df-a8df-c51a89a0bce4@gmx.de> Date: Thu, 7 Apr 2022 22:20:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH printk v2 09/12] printk: add functions to prefer direct printing Content-Language: en-US To: John Ogness , Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Kees Cook , Andrew Morton , Luis Chamberlain , Wei Liu , Xiaoming Ni , Peter Zijlstra , Andy Shevchenko , Marco Elver , Sebastian Andrzej Siewior , Daniel Lezcano , Shawn Guo , Dmitry Torokhov , Matti Vaittinen , "Eric W. Biederman" , Phil Auld , Juri Lelli , Wang Qing , rcu@vger.kernel.org References: <20220405132535.649171-1-john.ogness@linutronix.de> <20220405132535.649171-10-john.ogness@linutronix.de> <87zgkxnepg.fsf@jogness.linutronix.de> <7fc5853e-dbe6-c2d2-2130-003e3b9777bc@gmx.de> <878rsgvews.fsf@jogness.linutronix.de> From: Helge Deller In-Reply-To: <878rsgvews.fsf@jogness.linutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:MCP30BvgA48w2S6vbv0ww52S5IiHA5LgrkHY6aW/ilw2XmF20zj CyKNOA5UGd74GOaKDHhMTmRwVtC4l/zv7bG6nGoodZt2BMVqfZs8qs7iFD1g6j4HdHlFSYt M9qAQNgU+kmybrXaiBU+tw3h56jsi9KdJclSDdbiPtdLDIw55WXvoNyO6Sv+l4ecl8F0JeS Ux7LP2pLcpZrBw+3jhz3w== X-UI-Out-Filterresults: notjunk:1;V03:K0:vWjPjiUs2e8=:SQtDJq0Z8yB+0l9naVWmtO F61p2nma+jSN0aMMzp9zjTqH22d7/mHOFOJplbDT+DxS9WclQF/7bqe6aUbx6YBS2Ok/R5WqD l7HdE6leWz4eJkYBHqKS5K1eQw/pdA4mAGjFxEkNDHkGoAh/qrwOgs3jhjmPnFMr7omIkfT6G 9cvi88qfUETke7/Rc/S9OnM27+SE4s9ZwEMSyTCpAqdzkHIwnK9I+hc2pIB5OD9EAEmIr8dyj tBgt4Sra5qo+Gcw2EoevPrWO3Qtrku2OK99ZGfrJ9a2btWiPtnqI/r/6HxiX/48oJZE2mWW0B lhRrYQAcvRdPsOhDuH7SzC0a7TP71bPZs/0MOQyfIQ7sZimmtbW3BZUBPcDg1LRfFYqWcVIJE GhYSLpLyGMv6ch+wpXSFVixYk29FTA3iO+obfQNjnk53kwF116msTVfaWOEVSdwrdJQ3+v5J9 kj2HV+4Vk0IQeYZPDmF8ocDTHQx/AwwJNGvK6a+IOZZHN8kNvRPZPOQaFolTY7X3SWKH9fIN8 qJSpiYJvoqMkeNfyczKH9lyBIZBhaB/z2gcIrUktOyEkh9yECSdWFhbsu9LKiNQ5AIXIu0rXw 91MNnmeFX2nbfpF8TkkdQh6DQ5w7JIrdB04l0CmhVuds2vGkOgRo7jOKxNtplv59juDPMvm3y NhgQ3RAvrCULv+BvXzZEfWoyvs3qb2RqIQw0012Ms34C7+WE19NipEC7XENB6SyNVm0c4AztR 3VLt2XkdAbtS+G8swtENY2wHUFHWPpwmGKexieQLvQQEhfnJiK3jYvvHlxMnqU2Kj0juJoWLb cJl6R2LN7/P2rw41ch1tSaauQsDUa12L4dnP+cngZ826OjpLQ4P2fKyIW9eJBdXvH4x7oQ3vh htkC0OvJ5BPUhBr+GWZF+H8bs5fKMTcmMW7/EkJzpXwLgEr/LJobYWzvgc1CpTKgLvXnxrmVl p8WUytMBZP3BmE7m7NPjHey8HRtE/jqB5XEYSAaeE+rF5+D7W5qWHQE6VoN5smCXNBkMqtcWN nax6p74t6lkWGu69Ft0Icl7Ck2kYpzN1g7E/qcfXMP1nSLg86AL+QDko/IqehI453JnRLD5OE NTB9BhlSaFV9oI= X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 4/7/22 22:04, John Ogness wrote: > On 2022-04-07, Helge Deller wrote: >> In my case - while I debug low-level kernel code - I then just need to >> use pr_warn() or pr_emerg() and get it printed non-threadened. That's >> sufficient for me. > > Actually, no. The loglevel does not determine if a message is direct > printed or not. By "warn" I was referring to WARN_ON(condition). Oh, then there was a misunderstanding on my side. > If you are debugging low-level kernel code, you usually will _want_ > threaded printing. The timestamps match the printk() call, so you will > get accurate logs. And the runtime performance of your low-level kernel > code will not be significantly affected by the printk() call. That really much depends on what you debug. Currently I'm debugging some CPU hotplug stuff, and I really want my debug info printed immediately, otherwise it's too late to analyze what's going wrong. I can imaginge other use cases like trying to find memory leaks are similiar. > If for some reason you really want non-threaded printing, the patch we > are discussing creates new functions to manually activate it: > > printk_prefer_direct_enter(); > pr_info("debugging\n"); > printk_prefer_direct_exit(); That's quite unhandy. At least I would have thought that pr_emerg() would do that call sequence. Wouldn't it make sense to make pr_emerg() work unthreadened, as it's used quite seldom and only in special situations... > But then your pr_info() will cause significant latencies. The timestamp > would be the same, with or without direct printing. Yes, but that would be Ok in my case. Helge