[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230419082311.GA1496740@google.com>
Date: Wed, 19 Apr 2023 17:23:11 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Petr Mladek <pmladek@...e.com>
Cc: John Ogness <john.ogness@...utronix.de>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Michal Hocko <mhocko@...e.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] printk: Enough to disable preemption in printk deferred
context
On (23/04/19 09:42), Petr Mladek wrote:
> The comment above printk_deferred_enter()/exit() definition claims
> that it can be used only when interrupts are disabled.
>
> It was required by the original printk_safe_log_store() implementation.
> The code provided lockless synchronization between a single writer and
> a single reader. The interrupt and the normal context shared the same
> buffer.
>
> The commit 93d102f094be ("printk: remove safe buffers") removed
> these temporary buffers. Instead, the messages are stored directly into
> the new global lockless buffer which supports multiple parallel writers.
>
> As a result, it is safe to interrupt one writer now. The preemption still
> has to be disabled because the deferred context is CPU specific.
>
> Fixes: 93d102f094be ("printk: remove safe buffers")
> Signed-off-by: Petr Mladek <pmladek@...e.com>
Looks good to me
Reviewed-by: Sergey Senozhatsky <senozhatsky@...omium.org>
Powered by blists - more mailing lists