Issue
Thanks for stopping by!
So I just bought a href="https://www.element14.com/community/docs/DOC-83477/l/desktop-computer-kit-with-expansion-board-that-can-turn-a-raspberry-pi-into-a-real-desktop-pc" rel="nofollow noreferrer">Pi desktop kit for my RaspberryPi 3B v1.2, which features an add-on module with an mSATA disk slot, real-time clock and power control. I installed the latest raspbian stretch (kernel version 4.9.59-v7+) on the mSATA SSD, and are now booting Raspbian from it with no SD card in the onboard card reader.
A kworker process is now constantly hogging between 8.0-13.5% CPU usage, which I think seems quite unnecessary, and it has annoying consequences, fx lagging videos with Kodi. This has never happened before I added the module.
I then tried perf
(inspiration from this thread) by running sudo perf record -D 1000 -g -a sleep 20
and then sudo perf report
to figure out which kernel tasks might be responsible:
But I can't figure out how to go on from there to reduce the workload. Could it be caused by the real-time clock embedded in the add-on board as __timer_delay
, arch_timer_read_counter_long
, and arch_counter_get_cntpct
seem to have a high CPU usage? Other tasks with high load are finish_task_switch
and _raw_spin_unlock_irqrestore
tasks, but I can't guess what that's about.
Am I right that this is unnecessary work load of the CPU and if so, how can I reduce it?
Many thanks in advance!
Solution
I had the same issue and found the root cause was that I didn't insert SD card into my Raspberry Pi. When SD card is missing, the kernel frequently tries to scan the SD card slot, which causes high CPU usage.
Download sdtweak.dtbo
and replace the existing one under /boot/overlays/
with the new one, then add dtoverlay=sdtweak,poll_once
into /boot/config.txt
and reboot the machine. It worked for me.
See also: https://github.com/raspberrypi/linux/issues/2567
Answered By - hdk531 Answer Checked By - Clifford M. (WPSolving Volunteer)