[Problem]
CPU freq support is added to the kernel, debugging of CPU freq is started, and cpufreq. DEBUG = 1 is added to bootargs to enable the debug of CPU freq in the kernel. The CPU freq driver is added, but occasionally appears:
_ Ratelimit: XXX callbacks suppressed
[Solution process]
1. gogole or Baidu is fruitless, but someone suggested checking the log to see if it is helpful. So go:
CAT/var/log/messages
We found such a pile of things:
Dec 31 21:32:56 uclibc user. debug kernel: [42949461.000001] cpufreq-core: Target for CPU 0: 0 kHz, relation 0
Dec 31 21:32:56 uclibc user. debug kernel: [42949461.200000] cpufreq-core: Target for CPU 0: 0 kHz, relation 0
Dec 31 21:32:56 uclibc user. debug kernel: [42949461.400000] cpufreq-core: Target for CPU 0: 69642 kHz, relation 0
Dec 31 21:32:56 uclibc user. debug kernel: [42949461.600000] cpufreq-core: Target for CPU 0: 23214 kHz, relation 0
Dec 31 21:32:57 uclibc user. debug kernel: [42949461.800000] cpufreq-core: Target for CPU 0: 0 kHz, relation 0
Dec 31 21:32:57 uclibc user. debug kernel: [42949462.000000] cpufreq-core: Target for CPU 0: 0 kHz, relation 0
Dec 31 21:33:00 uclibc user. Warn kernel: [42949465.600000] _ ratelimit: 17 callbacks suppressed
Dec 31 21:33:00 uclibc user. debug kernel: [42949465.600011] cpufreq-core: Target for CPU 0: 0 kHz, relation 0
Dec 31 21:33:01 uclibc user. debug kernel: [42949465.800000] cpufreq-core: Target for CPU 0: 0 kHz, relation 0
Dec 31 21:33:01 uclibc user. debug kernel: [42949466.000000] cpufreq-core: Target for CPU 0: 0 kHz, relation 0
Dec 31 21:33:01 uclibc user. debug kernel: [42949466.200000] cpufreq-core: Target for CPU 0: 0 kHz, relation 0
Dec 31 21:33:01 uclibc user. debug kernel: [42949466.400000] cpufreq-core: Target for CPU 0: 0 kHz, relation 0
2. Go to system. map and find the function _ ratelimit. It indicates that this function contains the source code in the kernel.
3. Search _ ratelimit in source insight and find one of them:
Int printk_ratelimit (void)
{
Return_ Ratelimit(& Printk_ratelimit_state );
}
Export_symbol (printk_ratelimit );
[Solution]
The above information is added with the information in the previous log, so I thought it was probably caused by printing in printk. Because the debug support is added in the CPU freq core, these things will be printed, in addition, because the frequency of calling the CPU freq is very high, the printk output is too late, so the prompt _ ratelimit: XXX callbacks suppressed is displayed.
To find out the cause, you can simply go to the kernel to configure menuconfig and remove the debug support:
CPU power management-> [] Enable cpufreq debugging
Then, we also set cpufreq in the kernel startup parameter bootargs. DEBUG = 1 is also removed, and the CPU freq code will not print so much information, it will not prompt you to print too much, printk is too late to print.
Tip]
Other people may also have such problems. The solution is to find out what is printed in your kernel:
CAT/var/log/messages
(Note that this will produce endless output, so wait for the output section to clear the content, and then press Ctrl + C to stop it)
You will know the reason for this. For example, the printk cannot be printed because there are too many USB-related prints.
Address: http://www.crifan.com/resolved___ratelimit_xxx_callbacks_suppressed/