Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1636123
| From | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] printk: Use the main logbuf in NMI when logbuf_lock is available |
| Date | 2017-05-05 04:30 +0200 |
| Message-ID | <tDBah-3LK-1@gated-at.bofh.it> (permalink) |
| References | <tDraV-5t6-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On (05/04/17 17:46), Petr Mladek wrote:
[..]
> Suggested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Signed-off-by: Petr Mladek <pmladek@suse.com>
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
a small nitpick,
[..]
> void printk_nmi_enter(void)
> {
> - this_cpu_or(printk_context, PRINTK_NMI_CONTEXT_MASK);
> + /*
> + * The size of the extra per-CPU buffer is limited. Use it only when
> + * the main one is locked. If this CPU is not in the safe context,
> + * the lock must be taken on another CPU and we could wait for it.
> + */
> + if (raw_spin_is_locked(&logbuf_lock) &&
> + this_cpu_read(printk_context) & PRINTK_SAFE_CONTEXT_MASK) {
> + this_cpu_or(printk_context, PRINTK_NMI_CONTEXT_MASK);
could we please check `printk_context' (local to a particular CPU)
first and, if positive, then access `logbuf_lock' (which is global)?
-ss
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] printk: Use the main logbuf in NMI when logbuf_lock is available Petr Mladek <pmladek@suse.com> - 2017-05-04 17:50 +0200 Re: [PATCH v2] printk: Use the main logbuf in NMI when logbuf_lock is available Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-05-05 04:30 +0200
csiph-web