kernel_task hundreds of % CPU yet cpu frequency is being lowered I'm trying to solve the mystery of a crazy high cpu usage on kernel_task.

MacBook Pro (Retina, Mid 2012), 2.7 GHz Intel Core i7, Yosemite 10.10.2

I saw some advice to download the Intel Power Gadget. That showed me that the my CPU is slowing way down. How do I fix this? When this happens, I can sometimes cycle the power on the MBP. But this is driving me crazy.
Apple documents this.


  Activity Monitor may show that a process named kernel_task is using a large percentage of your CPU, and during this time you may notice a lot of fan activity. This process helps manage temperature by making the CPU less available to processes that are using the CPU intensely. In other words, kernel_task responds to conditions that cause your CPU to become too hot. When the temperature decreases, kernel_task automatically reduces its activity. 


https://support.apple.com/en-us/HT203184

You might want to reset the SMC one time to be sure it's not stuck and providing incorrect temperature readings to the processor.

If the SMC or high temperatures is the root cause, you should be able to correlate the various internal temperature sensors and physical measurement of the case and exhaust air temperature with the design throttling of the kernel scheduling and the clock rate adjustments the chipset is designed to make in response to thermal measurements.

Worst case, you have a hardware issue with faulty temperature sensors or an out-of-spec CPU that generates more heat than it should for a given GHz clock rate.