linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question: Takes about 2s in sched_clock_init() when kernel boots
@ 2013-10-31  5:29 Younger Liu
  2013-10-31  6:12 ` Xie XiuQi
  0 siblings, 1 reply; 2+ messages in thread
From: Younger Liu @ 2013-10-31  5:29 UTC (permalink / raw)
  To: kernel

Hi,
  When I analyse boot time on ArmV7, I found that it takes
about 2s in sched_clock_init(), the log is as follow:
[    0.000000] before:sched_clock_init.
[    0.000000] start:sched_clock_init.
[    2.100505] end  :sched_clock_init.
[    2.103983] before:calibrate_delay.

  In my config, CONFIG_HAVE_UNSTABLE_SCHED_CLOCK does not config.

  Are there any suggestions?

	Younger

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question: Takes about 2s in sched_clock_init() when kernel boots
  2013-10-31  5:29 Question: Takes about 2s in sched_clock_init() when kernel boots Younger Liu
@ 2013-10-31  6:12 ` Xie XiuQi
  0 siblings, 0 replies; 2+ messages in thread
From: Xie XiuQi @ 2013-10-31  6:12 UTC (permalink / raw)
  To: Younger Liu; +Cc: kernel

On 2013/10/31 13:29, Younger Liu wrote:
> Hi,
>   When I analyse boot time on ArmV7, I found that it takes
> about 2s in sched_clock_init(), the log is as follow:
> [    0.000000] before:sched_clock_init.
> [    0.000000] start:sched_clock_init.
> [    2.100505] end  :sched_clock_init.
> [    2.103983] before:calibrate_delay.
> 
>   In my config, CONFIG_HAVE_UNSTABLE_SCHED_CLOCK does not config.
> 
>   Are there any suggestions?

see below:
u64 sched_clock_cpu(int cpu)
{
	struct sched_clock_data *scd;
	u64 clock;

	WARN_ON_ONCE(!irqs_disabled());

	if (sched_clock_stable)
		return sched_clock();

	if (unlikely(!sched_clock_running))
		return 0ull;

	scd = cpu_sdc(cpu);
[...]

Unless sched_clock_running is set, it'll return 0. So, the
printk() time stamp is 0 before sched_clock_init calling.

> 
> 	Younger
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-31  6:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-31  5:29 Question: Takes about 2s in sched_clock_init() when kernel boots Younger Liu
2013-10-31  6:12 ` Xie XiuQi

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).