[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: high cpu usage in idle state
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: high cpu usage in idle state |
Date: |
Wed, 15 Sep 2021 11:07:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 9/15/21 9:46 AM, Ali Vatankhah wrote:
> Dear qemu developers
> I built an image for e5500 cpu with yocto and run with qemu ppce500 machine:
> qemu-system-ppc64 -nographic -M ppce500 -cpu e5500 -kernel uImage
> -initrd core-image-minimal.rootfs.ext2.gz -append 'root=/dev/ram rw'
> It works well, but as the emulated guest is in idle state, in the host
> it consumes 100% cpu on one core.
> Is this cpu usage due to guest idle instruction emulated on the host? is
> it possible to correct that?
It depends of:
- is your CPU able wait when there is no workload
(Old CPUs don't have this ability and just keep running
wasting cycles. Newer have instructions such "wait for
interrupt or something" or "idle")
- is your guest using such instruction, or doing a while(true)
loop while idling?