From: "Nikita V. Youshchenko" <yoush@cs.msu.su>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Sujit K M <sjt.kar@gmail.com>,
linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: PREEMPT_RT (2.6.33-rt17) disabled printk-to-console after console_init
Date: Thu, 20 May 2010 15:12:38 +0400 [thread overview]
Message-ID: <201005201512.40304@zigzag.lvk.cs.msu.su> (raw)
In-Reply-To: <alpine.LFD.2.00.1005201225170.3368@localhost.localdomain>
> > Still questions:
> >
> > 1) why does that prevent klogd from working?
>
> Patch below.
> ...
> @@ -1084,18 +1084,8 @@ void release_console_mutex(void)
> #endif
> }
> console_locked = 0;
> - raw_spin_unlock_irqrestore(&logbuf_lock, flags);
> mutex_unlock(&console_mutex);
Hmm... that lock is taken inside loop body, then control goes out of loop
at 'break' statement, and then, if this line is deteled, lock is still
held at function return. Looks wrong.
> > 2) why does print not pass to non-CON_ATOMIC even if called from
> > non-atomic context?
>
> That's a good question. We call release_console_mutex() always with
> interrupts disabled from printk(), so that atomic check triggers. Have
> to look deeper to figure out whether we can enable interupts there,
> probably not, but with the klogd fix this should not matter.
IMO it still matters, since printk-over-serial is almost only available
debugging tool when [while driver debugging] system just hangs and one is
trying to find out why and where.
> > 3) I believe that 8250 serial driver is aware of preempt-rt.
> > Could you please comment on my "2.6.33.2-rt13: RFC: fix serial
> > console" post to linux-rt-users list
> > (http://eeek.borgchat.net/lists/linux-rt-users/msg05569.html)
>
> While that can work due to the trylock, it can introduce massive
> latencies just in case some driver reports a status change or what
> ever.
Isn't it better just manually disable console (with 'quiet' kernel command
line option) when running in production? This may be recommended in proper
guidelines.
But while developing, serial console functionality is essential.
Nikita
next prev parent reply other threads:[~2010-05-20 11:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 13:13 PREEMPT_RT (2.6.33-rt17) disabled printk-to-console after console_init Xianghua Xiao
2010-05-18 19:28 ` Xianghua Xiao
2010-05-18 19:47 ` Thomas Gleixner
2010-05-18 20:49 ` Xianghua Xiao
2010-05-20 8:33 ` Nikita V. Youshchenko
2010-05-20 9:25 ` Sujit K M
2010-05-20 9:32 ` Sujit K M
2010-05-20 9:47 ` Thomas Gleixner
2010-05-20 10:23 ` Nikita V. Youshchenko
2010-05-20 10:52 ` Thomas Gleixner
2010-05-20 11:12 ` Nikita V. Youshchenko [this message]
2010-05-20 11:23 ` Thomas Gleixner
2010-05-20 11:40 ` Nikita V. Youshchenko
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=201005201512.40304@zigzag.lvk.cs.msu.su \
--to=yoush@cs.msu.su \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=sjt.kar@gmail.com \
--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).