/ 铃儿响叮当 / kworker high cpu

kworker high cpu

2014-07-03 posted in [day-to-day]

kworker 使 cpu 使用率过高

在x250上安装了14.04,发现启动后cpu的风扇一直在转,通过top发现kworker的cpu使用率在60%以上。

网上查找后,是由于显卡驱动的原因,gpe会发出大量的中断,可以通过以下命令找到真凶,:)

$ grep . -r /sys/firmware/acpi/interrupts/

/sys/firmware/acpi/interrupts/sci:  544288
/sys/firmware/acpi/interrupts/error:       0
/sys/firmware/acpi/interrupts/gpe00:       0   invalid
/sys/firmware/acpi/interrupts/gpe01:       0   invalid
...
/sys/firmware/acpi/interrupts/gpe16:       0   invalid
/sys/firmware/acpi/interrupts/gpe0A:       0   invalid
/sys/firmware/acpi/interrupts/gpe17:       0   invalid
/sys/firmware/acpi/interrupts/gpe0B:  535279   enabled
/sys/firmware/acpi/interrupts/gpe18:       0   invalid

在正常的情况下’gpe0B’不应该发出这么多的中断,而且增加迅速。

$ sudo su
# echo "disable" > /sys/firmware/acpi/interrupts/gpe0B

立竿见影,cpu的使用率一下降下来了,以后每次开机都把它禁用掉’crontab -e’, 加入下面的一行,以root权限运行。

# crontab -e 
@reboot echo "disable" > /sys/firmware/acpi/interrupts/gpe13

Links

http://www.ubuntuask.com/q/answers-why-does-kworker-cpu-usage-get-so-high-176565.html