Re: [RFC V2 12/21] rv/reactor: Add the printk reactor

From: John Ogness
Date: Tue Feb 15 2022 - 08:33:18 EST


On 2022-02-15, Daniel Bristot de Oliveira <bristot@xxxxxxxxxx> wrote:
>> I suggest using printk_deferred() for this reactor for now. With
>> printk_deferred() the message and timestamp are immediately and
>> locklessly stored in the buffer, and the printing is performed in a
>> separate context. printk_deferred() is safe for all contexts.
>
> Question: Does it always postpone or only postpone when in a
> particular contexts, like, with irqs disabled?

printk_deferred() always postpones printing.

> Note: do not use this reactor with rq_lock taken, it will lock the
> system until printk can handle that.

Perhaps you could explain thi comment in your commit message? printk()
should never lock the system.

John