From: John Stultz <john.stultz@linaro.org>
To: Jiri Bohac <jbohac@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: is printk() safe within a timekeeper_seq write section?
Date: Thu, 27 Mar 2014 17:49:31 -0700 [thread overview]
Message-ID: <5334C71B.1090506@linaro.org> (raw)
In-Reply-To: <20140312092125.GA30305@midget.suse.cz>
On 03/12/2014 02:21 AM, Jiri Bohac wrote:
> On Tue, Mar 11, 2014 at 02:54:13PM -0700, John Stultz wrote:
>> Ok, so a generic solution is probably not going to be worth it then. My
>> thought was that since we do a very limited amount of informational
>> printks in the timekeeping code, we can be fairly safe delaying the
>> print-out until we drop the locks.
>>
>> For timekeeping, its really 4 call sites:
>> * invalid inject_sleep_time deltas
>> * > 11% clocksource freq adjustments
>> * insert leap second
>> * delete leap second
> I believe these last two were made safe by
> commit ca4523cd (timekeeping: Shorten seq_count region).
>
> write_seqcount_begin(&timekeeper_seq) is now done after the
> accumulate_nsecs_to_secs(tk) from where the printks are called.
So I started looking into deferring the printk with a small local
buffer, but I suddenly realized there are all these WARN_ON's around
which would likely have the same problem, no?
So I'm starting to doubt we can safely get away with a timekeeping
specific hack to defer the printk. :(
thanks
-john
next prev parent reply other threads:[~2014-03-28 0:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 17:45 is printk() safe within a timekeeper_seq write section? Jiri Bohac
2014-03-11 19:29 ` John Stultz
2014-03-11 21:32 ` Thomas Gleixner
2014-03-11 21:54 ` John Stultz
2014-03-12 6:49 ` Peter Zijlstra
2014-03-12 9:21 ` Jiri Bohac
2014-03-28 0:49 ` John Stultz [this message]
2014-03-12 6:46 ` Peter Zijlstra
2014-03-12 14:34 ` Jan Kara
2014-03-12 15:06 ` Peter Zijlstra
2014-03-14 15:13 ` Jan Kara
2014-03-12 13:13 ` Jan Kara
2014-03-12 9:25 ` Peter Zijlstra
2014-03-12 9:18 ` 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=5334C71B.1090506@linaro.org \
--to=john.stultz@linaro.org \
--cc=a.p.zijlstra@chello.nl \
--cc=jbohac@suse.cz \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.