Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3333701pxb; Mon, 25 Jan 2021 13:05:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwf82bkZ/AXKyzeOQDRTeYVfiZIBk/dzm/IZjMHP/+GDsiqNEHl1/bAyYvnh/ZtlJeN7Gr0 X-Received: by 2002:a17:906:59a:: with SMTP id 26mr1465200ejn.309.1611608723270; Mon, 25 Jan 2021 13:05:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611608723; cv=none; d=google.com; s=arc-20160816; b=yVOXA4jH3WNLFK83ho+Wu3UbPJGZAHaUctCH23ueg7BSxIKP7t6r82fdsJnKDH5sBk JoFFWLCYFAmwtozebv4sU2U1cj4pkXQvLtgrCQ6oae/mLiLjq+VLcLzsT/gdo564XVlY fASo+kYTaBKYy68UFxKsztXsKDkptWlU5+AD9MRLfqJe4NlzDlIqlRE6AuKuHQ1wHLGV kGKUHngQTTi8pZd+JfHtBIpFYN0kPHjPL5wZ1/zL4euVCFOoNKQNnN7IZsMCXXANkZ3X fHNEfztrOlHxY7994KFuMdo+S3Yh5tgYpibHrJZo81TBjgGTCf3duI+04Ii2/Rr38OmS JZ6w== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Z+VQiQzcBIjzZ2Mdc0qHp+wqHCdpvrS/6sSiuFTu80Y=; b=ZA33T2yHt/RDCPyuXTqffkl1P0pHKeLID0zRdePuruyGReUU0HCgUyIgS/4B3vxh0A 376kJCOrCMfpgDnEec+gCOeyStawZUOPv7+0l5q/G92+Y0DEcG6MhYxhX03TW5+rQ2UP 8s1774LB/83S3Y8N7hWl09qqKXTSwMu8xVA8uQmnLCMV9dnskUHimJdKQUTMK0E9xHm4 5K2ZOBtPt0xnCZUNLcRr7m1lfeSBA+3cR3a/Ct6GL80Txp1rSKG50vnyFUt1cKDHa128 1wcK+Drnt1KouFNP6XaCcFWHskMsH7hLmz9MCXylnBsH46k+66sdgs0CuNCB3akViqru 4huw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si7628852edu.188.2021.01.25.13.04.59; Mon, 25 Jan 2021 13:05:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732415AbhAYVBl (ORCPT + 99 others); Mon, 25 Jan 2021 16:01:41 -0500 Received: from foss.arm.com ([217.140.110.172]:58644 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732117AbhAYTrm (ORCPT ); Mon, 25 Jan 2021 14:47:42 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 03AF731B; Mon, 25 Jan 2021 11:46:06 -0800 (PST) Received: from e107158-lin (unknown [10.1.194.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 000763F66E; Mon, 25 Jan 2021 11:46:04 -0800 (PST) Date: Mon, 25 Jan 2021 19:46:02 +0000 From: Qais Yousef To: John Ogness Cc: Peter Zijlstra , Petr Mladek , Sergey Senozhatsky , Thomas Gleixner , Steven Rostedt , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] printk: Add new pr_*_deferred_once() variants Message-ID: <20210125194602.4ayir2tmlllmrnk4@e107158-lin> References: <20210123233741.3614408-1-qais.yousef@arm.com> <20210123233741.3614408-2-qais.yousef@arm.com> <87y2gh2shy.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87y2gh2shy.fsf@jogness.linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/25/21 12:04, John Ogness wrote: > On 2021-01-25, Peter Zijlstra wrote: > > On Sat, Jan 23, 2021 at 11:37:40PM +0000, Qais Yousef wrote: > >> To allow users in code where printk is not allowed. > >> > >> Signed-off-by: Qais Yousef > >> --- > >> include/linux/printk.h | 24 ++++++++++++++++++++++++ > >> 1 file changed, 24 insertions(+) > >> > >> diff --git a/include/linux/printk.h b/include/linux/printk.h > >> index fe7eb2351610..92c0978c7b44 100644 > >> --- a/include/linux/printk.h > >> +++ b/include/linux/printk.h > >> @@ -480,21 +480,45 @@ extern int kptr_restrict; > >> printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) > >> /* no pr_cont_once, don't do that... */ > >> > >> +#define pr_emerg_deferred_once(fmt, ...) \ > >> + printk_deferred_once(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) > >> +#define pr_alert_deferred_once(fmt, ...) \ > >> + printk_deferred_once(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) > >> +#define pr_crit_deferred_once(fmt, ...) \ > >> + printk_deferred_once(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) > >> +#define pr_err_deferred_once(fmt, ...) \ > >> + printk_deferred_once(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) > >> +#define pr_warn_deferred_once(fmt, ...) \ > >> + printk_deferred_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) > >> +#define pr_notice_deferred_once(fmt, ...) \ > >> + printk_deferred_once(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) > >> +#define pr_info_deferred_once(fmt, ...) \ > >> + printk_deferred_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) > >> +/* no pr_cont_deferred_once, don't do that... */ > > > > I absolutely detest this.. the whole _deferred thing is an > > abomination. > > And it will disappear at some point. > > > We should be very close to printk not needing this anymore, printk > > people? > > It will disappear once console printing threads are introduced. We > probably still have a few kernel releases until we see that. First we > need to finish merging full lockless access, remove the safe buffers, > and merge the atomic consoles. Okay. As I said in the cover letter, I didn't think the addition of these new macros looked like a win overall. I will drop this patch and just open code the use of printk_deferred_once() in hrtimer_interrupt(). Which should be easier to fix later when it should disappear. Thanks -- Qais Yousef