Re: [PATCH next v3 3/3] printk: remove logbuf_lock protection for ringbuffer

2020-12-08 Thread Sergey Senozhatsky
On (20/12/07 23:26), John Ogness wrote: > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index e1f068677a74..f3c0fcc3163f 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -1068,7 +1068,6 @@ void __init setup_log_buf(int early) > struct printk_record

Re: [PATCH next v3 3/3] printk: remove logbuf_lock protection for ringbuffer

2020-12-08 Thread Petr Mladek
On Mon 2020-12-07 23:26:20, John Ogness wrote: > Since the ringbuffer is lockless, there is no need for it to be > protected by @logbuf_lock. Remove @logbuf_lock protection of the > ringbuffer. This patch removes the protection only on the write part. Please, make it clear here and also in the

Re: [PATCH next v3 3/3] printk: remove logbuf_lock protection for ringbuffer

2020-12-07 Thread John Ogness
On 2020-12-07, John Ogness wrote: > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index e1f068677a74..f3c0fcc3163f 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c [...] > int vprintk_store(int facility, int level, > const struct

[PATCH next v3 3/3] printk: remove logbuf_lock protection for ringbuffer

2020-12-07 Thread John Ogness
Since the ringbuffer is lockless, there is no need for it to be protected by @logbuf_lock. Remove @logbuf_lock protection of the ringbuffer. This means that printk_nmi_direct and printk_safe_flush_on_panic() no longer need to acquire any lock to run. Without @logbuf_lock it is no longer possible