All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Peter Zijlstra <peterz@infradead.org>, Qais Yousef <qais.yousef@arm.com>
Cc: Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] printk: Add new pr_*_deferred_once() variants
Date: Mon, 25 Jan 2021 12:04:01 +0106	[thread overview]
Message-ID: <87y2gh2shy.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <YA6fTuFEaCjFQB3h@hirez.programming.kicks-ass.net>

On 2021-01-25, Peter Zijlstra <peterz@infradead.org> 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 <qais.yousef@arm.com>
>> ---
>>  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

  reply	other threads:[~2021-01-26 19:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-23 23:37 [PATCH 0/2] Fix BUG: Invalid wait context in hrtimer_interrupt() Qais Yousef
2021-01-23 23:37 ` [PATCH 1/2] printk: Add new pr_*_deferred_once() variants Qais Yousef
2021-01-25 10:37   ` Peter Zijlstra
2021-01-25 10:58     ` John Ogness [this message]
2021-01-25 19:46       ` Qais Yousef
2022-01-11 13:40       ` Andy Shevchenko
2022-01-13 11:20         ` Qais Yousef
2021-01-23 23:37 ` [PATCH 2/2] hrtimer: Use pr_warn_deferred_once() in hrtimer_interrupt() Qais Yousef
2021-01-26  4:46 ` [PATCH 0/2] Fix BUG: Invalid wait context " Sergey Senozhatsky
2021-01-26 14:59   ` Qais Yousef
2021-01-26 15:22     ` John Ogness
2021-01-26 16:18       ` Peter Zijlstra
2021-01-26 15:58     ` Sergey Senozhatsky
2021-01-26 16:23       ` Peter Zijlstra
2021-01-26 18:08         ` Qais Yousef
2021-01-26 16:58       ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2gh2shy.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=qais.yousef@arm.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.