Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp76465pxh; Thu, 7 Apr 2022 14:29:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweZsr99pCAlsXZwryJKgiTjGWn5I/PCQBHgLLrndCOv/bJX0sH3y582Cfk/rgTwo3x9Ecv X-Received: by 2002:a17:90a:448d:b0:1ca:1ff6:da22 with SMTP id t13-20020a17090a448d00b001ca1ff6da22mr18407528pjg.12.1649366964446; Thu, 07 Apr 2022 14:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649366964; cv=none; d=google.com; s=arc-20160816; b=0jU0fZUOKwwrOT4dl3MAxVOVAueJ07F6pSZzxzKiQXOdiBVeiDc2FkQtXHxwTaaesr GjtqQbSifr5Dw0arWBrWSjuLa7yV/y2rIlnagjZFi1eGN4WtPHdo8YDm4tpflxeOX6vw piZH6TpxOoh+dlQm/WvxYvmPh2D4wmgxRlpWexIlfm781nYRvl7uuroUPeMSO2ZKpir2 VmQvF3F7A9578ewUi7XLe0oS3syKJ0eNHmpGOqgZLrVHSWGhm4lf9c83ioWR4oUBl7kI UIwD3NjMRee20jpHRULd6xyI5AbbPta40QPs5JBrw+9Kpim3354dsWvi4BJZlm4bZ0Cl Lr+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=BYGDkh4CW9jxYKa2CiygjphDRK87uC0bCFLxEBlauK0=; b=HM64I8k743KTnPFHxuU2jVTXhbgffNhBqD498SI/q3f7BPB74in+h8OpjsimiLmcWD r1XwSoNALvbWbL3VJEkoVMxjAdfQePEBW3vHINelAPnLvQRNHdTzKuv4GEKum77sN/TP zemvB7Pe7mDpBFTbH2XOsVAb7i07hGXs8Y8neuaTGfNfyy+MQjlMjaBK2WtDFGiLg0oX swAEfKsWH0/mvRoF7lydaSpX0re50WHMXSLUCbzfLgAgzpomFDOkVOj/W5m+4mJodad4 mt9vgmVV+NmiQ1dNegXfkK4cZWiPQSfSSQ9mXO0G5UcsIHoy1yv/zDwmGdPK/L2VKtUz i+4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UCw39tqt; dkim=neutral (no key) header.i=@linutronix.de; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u11-20020a17090282cb00b00153b2d164efsi716604plz.247.2022.04.07.14.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 14:29:24 -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=@linutronix.de header.s=2020 header.b=UCw39tqt; dkim=neutral (no key) header.i=@linutronix.de; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5B8E4492181; Thu, 7 Apr 2022 13:34:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229967AbiDGUg2 (ORCPT + 99 others); Thu, 7 Apr 2022 16:36:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbiDGUgC (ORCPT ); Thu, 7 Apr 2022 16:36:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D22533DC8D; Thu, 7 Apr 2022 13:21:56 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1649361860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BYGDkh4CW9jxYKa2CiygjphDRK87uC0bCFLxEBlauK0=; b=UCw39tqt9vy4XBuGCC6AIUO/pKx/xIVPxZsglv0mtw6BFKlTAvFXVFP+FYpST+1q1WgF6/ SuAMC6Qi2aTL9fBNMeiUyqnYtRoZCfHmu2wZGwPvI8bUKAEIMsMq6UpJi97UuqZSixBneV zVI1wOdVdzR59bFdsa0gLL3R13ZukPK+G09ufexdA73XaP8NRLT8COfei+ZEju7xj18WA7 +wl17tx+IyuVNpmag5PL/NO2B3vLTqgPSzrpuwwZXH7ZToLqPbuADAY//ShQZPTpHN0tH0 kOczv9gXlFyNKSeYAE8ntr3DK/zJ6hw0hxvuWSJm1EzhPHvVugvwe0Esj1tH5g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1649361860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BYGDkh4CW9jxYKa2CiygjphDRK87uC0bCFLxEBlauK0=; b=fSf09ft2PuysFOOCA/YnECK+DcmkYXc0VrisVM/2dkaLtnHdnmWL05UK4w4gXIF9gLydpe g87cPo5h8D3aiSAg== To: Helge Deller , 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 Subject: Re: [PATCH printk v2 09/12] printk: add functions to prefer direct printing In-Reply-To: <7fc5853e-dbe6-c2d2-2130-003e3b9777bc@gmx.de> 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> Date: Thu, 07 Apr 2022 22:10:19 +0206 Message-ID: <878rsgvews.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INVALID_DATE_TZ_ABSURD,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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-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). 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. 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(); But then your pr_info() will cause significant latencies. The timestamp would be the same, with or without direct printing. John