From: Peter Zijlstra <peterz@infradead.org>
To: Richard Weinberger <rw@linutronix.de>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de
Subject: Re: [PATCH -rt] printk: Disable migration instead of preemption
Date: Mon, 12 Dec 2011 16:25:31 +0100 [thread overview]
Message-ID: <1323703531.21400.1.camel@twins> (raw)
In-Reply-To: <1323696956-11445-1-git-send-email-rw@linutronix.de>
On Mon, 2011-12-12 at 14:35 +0100, Richard Weinberger wrote:
> There is no need do disable preemption in vprintk(),
> disable_migrate() is sufficient.
> This fixes also a the following bug in -rt:
>
> [ 14.759233] BUG: sleeping function called from invalid context
> at /home/rw/linux-rt/kernel/rtmutex.c:645
> ---
> kernel/printk.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/printk.c b/kernel/printk.c
> index a50af4e..13d0825 100644
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -898,7 +898,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
> boot_delay_msec();
> printk_delay();
>
> - preempt_disable();
> + migrate_disable();
> /* This stops the holder of console_sem just where we want him */
> raw_local_irq_save(flags);
> this_cpu = smp_processor_id();
> @@ -1029,7 +1029,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
> out_restore_irqs:
> raw_local_irq_restore(flags);
>
> - preempt_enable();
> + migrate_enable();
> return printed_len;
> }
> EXPORT_SYMBOL(printk);
One has to wonder why this patch makes any difference what so ever, note
how right after/before the preempt_disable/enable there's a
raw_local_irq_save/restore and last time I checked those really did
disable IRQs, even on -rt.
next prev parent reply other threads:[~2011-12-12 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-12 13:35 Richard Weinberger
2011-12-12 15:25 ` Peter Zijlstra [this message]
2011-12-12 16:35 ` Thomas Gleixner
2011-12-12 16:47 ` Peter Zijlstra
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=1323703531.21400.1.camel@twins \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rw@linutronix.de \
--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
all inboxes | Powered by JetHome®