From: Petr Mladek <pmladek@suse.com>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Russell King <rmk+kernel@arm.linux.org.uk>,
Daniel Thompson <daniel.thompson@linaro.org>,
Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Chris Metcalf <cmetcalf@ezchip.com>,
x86@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH v2] printk: Use the main logbuf in NMI when logbuf_lock is available
Date: Wed, 17 May 2017 17:08:17 +0200 [thread overview]
Message-ID: <20170517150817.GD8621@pathway.suse.cz> (raw)
In-Reply-To: <20170505022141.GA418@tigerII.localdomain>
On Fri 2017-05-05 11:21:41, Sergey Senozhatsky wrote:
> 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>
Thanks for ack.
> 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)?
OK, I did so and queued the fix for-4.13, see
https://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git/commit/?h=for-4.13&id=ad30113010b7b2dd886923261aea7034de07cce6
Best Regards,
Petr
next prev parent reply other threads:[~2017-05-17 15:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 15:46 Petr Mladek
2017-05-05 2:21 ` Sergey Senozhatsky
2017-05-17 15:08 ` Petr Mladek [this message]
2017-05-19 2:58 ` Sergey Senozhatsky
2017-05-19 4:38 ` Sergey Senozhatsky
2017-05-19 13:02 ` Petr Mladek
2017-05-20 9:04 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170517150817.GD8621@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=cmetcalf@ezchip.com \
--cc=daniel.thompson@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®