schedule_timeout sleeps too long after dividing CPU frequency
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu May 14 06:53:54 PDT 2015
On Thu, May 14, 2015 at 03:06:54PM +0200, Mason wrote:
> I added a printk inside twd_update_frequency().
>
> http://lxr.free-electrons.com/source/arch/arm/kernel/smp_twd.c?v=3.14#L107
>
> I inserted printk("NEW RATE=%lu\n", twd_timer_rate);
> right before the call to clockevents_update_freq().
>
> When I execute "echo 18500 > scaling_max_freq"
> the system is supposed to change the CPU frequency to 18.5 MHz
> (I might have a bug lurking there) and PERIPHCLK is 1/2 of that,
> i.e 9.25 MHz.
>
> twd_update_frequency() is called twice: once for each CPU.
> (The timers are local to each CPU.)
That's expected.
I wonder if clockevents_update_freq() is returning an error - which we
don't check, and don't print a warning. It would probably be a very
good idea to print a warning as a failure to reconfigure the clock
events code for a different frequency will lead to this kind of issue.
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
More information about the linux-arm-kernel
mailing list