Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4146686pxb; Tue, 26 Jan 2021 13:43:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJygpTKkLeUgJw7f4q+r0eAKDf6vRgvfh3OZMFaRc7HzJXABIdg1UDil2Yh+HTCeWwb/pCDk X-Received: by 2002:aa7:d504:: with SMTP id y4mr6005064edq.372.1611697385604; Tue, 26 Jan 2021 13:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611697385; cv=none; d=google.com; s=arc-20160816; b=TE3695b1C7D8nJWttVkBxzNr9eAd2itzyAo2UatpOdkjsQBQyAOdJB5/Q56oep78m/ wACSqXi8kSA/VlRdOkS2kynYz8kcSSiv4lxnPmuD41ETzf88E3a8GS5FePGShW9n3mhc ksHim4Mb431FSO8cNjY0zGCvy00NTniywQSCVIdbXIEYCQwgSgPoiZSwG7f8mzxj+OTg F1l8K0ybETyyE8EJwc4SZe0doyNdKDJIaJbe/gW9lZkmrMn+VEvluSg93OxIHlWcBlYr Kk59LAOvigvpYGaG8w9unEaJCVwRjuU91FoZBjil96tDKV04SqvwEioOibmckIglG1Fo aTBg== 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=lEO7WoD6DzShicexf0VoynVWGbvCVvQ/Xhb1dgLNrbs=; b=HUEuEegDCs2gWCrRrPsbyAelVxB3GL+Lo4j8wbE4L73WSJppnzU3FdAH1CQIcWnE2c DzQ6c7RwXZEBwkgrzCyvLw5TFbFmdp7T3owG7BLPjyT0K2nbs5GF8FFx4zZqLjMHrg+p IsjwP+Ss9/oqfq1mBApMj65FeA0oNQp5/eiiJJzv4o2wBZgcR5LkrXIwl2tX3bqg7PTL bbLEjktmFag0Egpgez854dIcKzrFNlrq/9IFN8z3jYoVAfJvYVqXe2Fze3lsWZ7ac/tl I/J0G9PxfCEes7gPcC4KnCeg9Nq81GRdXx2+RcRIwq6Vxyt8QCJBnPaMl6ghXQeVWPE6 gaFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=e6dc46Vp; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=LWrMN13V; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd24si7212683ejb.666.2021.01.26.13.42.40; Tue, 26 Jan 2021 13:43:05 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=e6dc46Vp; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=LWrMN13V; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388074AbhAZFjV (ORCPT + 99 others); Tue, 26 Jan 2021 00:39:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727672AbhAYK6q (ORCPT ); Mon, 25 Jan 2021 05:58:46 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 854E8C06178C for ; Mon, 25 Jan 2021 02:58:04 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1611572282; 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=lEO7WoD6DzShicexf0VoynVWGbvCVvQ/Xhb1dgLNrbs=; b=e6dc46Vpk7kxXHBrloHfUSIus0s/AUbnwNO126nlP3AHMuLcC5tshz8m9qdiaaTOfh7xBX hOX21Wj1To8pEZmkM7RiXUJcNNFF38CshshoNREW1QCv9rsSxo5rybPZ8rfTj5XcshTOl3 1mLDPyapwGXX6Rod9WC+I9WWtdxb16WY+IF/AyKAyyDWIgyUolX3yBu4M3CKhryjFivyTF ejJSlj/fAIOwtOhs8rZgRfmbpEnZjV53h87xIFd5f1XWX8EIrnnd4+pU20Zbt6sAQuQcIt 4+DjsqjTgHZgJ3W0Y8E5DrOhtJhvxeOEF+MWFybyRbunNCvgKYXnHUW/jjgQUA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1611572282; 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=lEO7WoD6DzShicexf0VoynVWGbvCVvQ/Xhb1dgLNrbs=; b=LWrMN13V6ymU8t2TqLwkyxi2piXrfOulnHGB2x/NSbjziVMJiZ28HNAXm/nEetCKTGK7m5 LdJLN6rte+E8BDDg== To: Peter Zijlstra , Qais Yousef Cc: 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 In-Reply-To: References: <20210123233741.3614408-1-qais.yousef@arm.com> <20210123233741.3614408-2-qais.yousef@arm.com> Date: Mon, 25 Jan 2021 12:04:01 +0106 Message-ID: <87y2gh2shy.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. John Ogness