From: 林建安 <colin@realtek.com.tw>
To: <linux-kernel@vger.kernel.org>
Subject: jiffies got lost because of printk
Date: Tue, 14 Jul 2009 19:39:03 +0800 [thread overview]
Message-ID: <48F90369174947C98F6AE82888FA60C5@realtek.com.tw> (raw)
Hi there,
We found that system time is not synced with RTC time on our embedded
system.
This is because sometimes we print too many chars to console.
For these lines in the function, release_console_sem, of printk.c,
for ( ; ; ) {
spin_lock_irqsave(&logbuf_lock, flags);
wake_klogd |= log_start - log_end;
if (con_start == log_end)
break; /* Nothing to print */
_con_start = con_start;
_log_end = log_end;
con_start = log_end; /* Flush */
spin_unlock(&logbuf_lock);
call_console_drivers(_con_start, _log_end);
local_irq_restore(flags);
}
Interrupt will be disabled before calling call_console_drivers and enabled
after call_console_drivers finishes.
For the setting of com port baud rate 115200 and HZ 100, if there are more
than 115200/8/100 bytes waiting for output,
interrupt will be disabled for more than 1 HZ and timer interrupt will be
lost.
I know that printing too much in kernel level is not proper. But for 1000HZ,
interrupt may be lost even just output 15 chars.
Any idea?
Regards,
Colin
next reply other threads:[~2009-07-14 11:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 11:39 林建安 [this message]
2009-07-14 15:23 ` Linus Walleij
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=48F90369174947C98F6AE82888FA60C5@realtek.com.tw \
--to=colin@realtek.com.tw \
--cc=linux-kernel@vger.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®