From: Jan Kara <jack@suse.cz>
To: John Stultz <john.stultz@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Jan Kara <jack@suse.cz>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Bohac <jbohac@suse.cz>, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 1/4] printk: Re-add irqsave/restore in printk_sched
Date: Sun, 4 May 2014 16:58:47 +0200 [thread overview]
Message-ID: <20140504145847.GA7433@quack.suse.cz> (raw)
In-Reply-To: <1399068558-2373-2-git-send-email-john.stultz@linaro.org>
On Fri 02-05-14 15:09:15, John Stultz wrote:
> A commit in akpm's tree (printk: remove separate printk_sched
> buffers...), removed the printk_sched irqsave/restore lines
> since it was safe for current users. Since we may be expanding
> usage of printk_sched(), re-add the irqsave/restore logic
> to make the functionality more generally safe.
So I'm just wondering: Do you have anything particular for which you need
interrupts disabled? Won't e.g. disabling preemption be enough?
Honza
> Cc: Jan Kara <jack@suse.cz>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Jiri Bohac <jbohac@suse.cz>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> ---
> kernel/printk/printk.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 82d19e6..bf62f2b 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2586,15 +2586,18 @@ void wake_up_klogd(void)
>
> int printk_sched(const char *fmt, ...)
> {
> + unsigned long flags;
> va_list args;
> int r;
>
> + local_irq_save(flags);
> va_start(args, fmt);
> r = vprintk_emit(0, SCHED_MESSAGE_LOGLEVEL, NULL, 0, fmt, args);
> va_end(args);
>
> __this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT);
> irq_work_queue(&__get_cpu_var(wake_up_klogd_work));
> + local_irq_restore(flags);
>
> return r;
> }
> --
> 1.9.1
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2014-05-04 14:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-02 22:09 [PATCH 0/4] Convert timekeeping core to use printk_deferred (v2) John Stultz
2014-05-02 22:09 ` [PATCH 1/4] printk: Re-add irqsave/restore in printk_sched John Stultz
2014-05-04 14:58 ` Jan Kara [this message]
2014-05-04 16:13 ` Peter Zijlstra
2014-05-05 20:16 ` John Stultz
2014-05-02 22:09 ` [PATCH 2/4] printk: Rename printk_sched to printk_deferred John Stultz
2014-05-02 22:09 ` [PATCH 3/4] printk: Add printk_once_deferred John Stultz
2014-05-02 22:09 ` [PATCH 4/4] timekeeping: Use printk_deferred when holding timekeeping seqlock John Stultz
2014-05-02 23:05 ` [PATCH 0/4] Convert timekeeping core to use printk_deferred (v2) Andrew Morton
2014-05-05 15:30 ` Steven Rostedt
2014-05-05 18:42 ` Steven Rostedt
2014-05-05 20:25 ` John Stultz
2014-05-05 20:15 ` John Stultz
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=20140504145847.GA7433@quack.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=jbohac@suse.cz \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).