From: john.stultz@linaro.org (John Stultz)
To: linux-arm-kernel@lists.infradead.org
Subject: Weird sched_clock behaviour during boot with -rc1
Date: Tue, 04 Feb 2014 12:46:03 -0800 [thread overview]
Message-ID: <52F1518B.9010109@linaro.org> (raw)
In-Reply-To: <20140204183641.GA25127@mudshark.cambridge.arm.com>
On 02/04/2014 10:36 AM, Will Deacon wrote:
> Hi guys,
>
> Booting -rc1 on my TC2 gives the following strange entries in the dmesg:
>
>
> Uncompressing Linux... done, booting the kernel.
> [ 0.000000] Booting Linux on physical CPU 0x0
>
> [...]
>
> [ 0.000000] HighMem zone: 329728 pages, LIFO batch:31
> [ 7.789662] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
> [ 0.000129] PERCPU: Embedded 9 pages/cpu @ee7bd000 s12800 r8192 d15872 u36864
>
> [...]
>
> [ 0.868297] NR_IRQS:16 nr_irqs:16 16
> [ 0.886350] Architected cp15 timer(s) running at 24.00MHz (phys).
> [ 2915.164998] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 2863311519744ns
> [ 0.000002] Switching to timer-based delay loop
> [ 0.014249] Console: colour dummy device 80x30
>
>
> so it looks like something whacky goes on during sched_clock registration.
> Sure enough, we're doing a pr_info in-between updating cs.* and calling
> update_sched_clock(), so moving the print sorts things out (diff below).
Yea... we have to be particularly careful with sched_clock to avoid
locks since we don't want to deadlock, but in this case
sched_clock_register is a little too relaxed here.
Stephen: Would it make sense to set cd.suspended = true at the top of
the registration? That should block any sched_clock calls from getting
half-updated data, but still allow the sched_clock_update function to work.
> What I can't figure out is why this has suddenly started happening with
> 3.14. Any ideas?
No clue. I'm guessing something like timing changes in the printk paths
that call sched_clock?
I suspect your patch to move the print down will also be a good idea
along with the suspending sched_clock while we register new ones.
thanks
-john
next prev parent reply other threads:[~2014-02-04 20:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 18:36 Weird sched_clock behaviour during boot with -rc1 Will Deacon
2014-02-04 20:46 ` John Stultz [this message]
2014-02-04 22:00 ` Stephen Boyd
2014-02-05 21:47 ` Josh Cartwright
2014-02-07 18:23 ` John Stultz
2014-02-07 19:37 ` Stephen Boyd
2014-02-07 20:48 ` [PATCH] sched_clock: Prevent callers from seeing half-updated data Stephen Boyd
2014-02-07 22:22 ` Stephen Boyd
2014-02-07 22:28 ` John Stultz
2014-02-11 6:49 ` Stephen Boyd
2014-02-17 18:13 ` John Stultz
2014-02-07 22:28 ` [PATCH v2] " Stephen Boyd
2014-02-10 11:14 ` Will Deacon
2014-02-17 11:19 ` Will Deacon
2014-02-17 18:04 ` 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=52F1518B.9010109@linaro.org \
--to=john.stultz@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).