lkml.org 
[lkml]   [2018]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk/nmi: Prevent deadlock when serializing NMI backtraces
On (05/18/18 11:07), Sergey Senozhatsky wrote:
>
> if (this_cpu_read(printk_context) & PRINTK_SAFE_CONTEXT_MASK) ||
> raw_spin_is_locked(&logbuf_lock)
>
> just to check per-CPU `printk_context' first and only afterwards
> access the global `logbuf_lock'. printk_nmi_enter() happens on
> every CPU, so maybe we can avoid some overhead by checking the
> local per-CPU data first.

Nah, may be it won't. This, probably, would have been the case if we
had continue to call console drivers from printk_safe section [at least].
CPUs don't spend that much time in printk_safe sections.

-ss

\
 
 \ /
  Last update: 2018-05-18 08:38    [W:0.159 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site