On 2016-11-23 17:00, Ralf Ramsauer wrote:
> Hi Mark,
> 
> On 11/23/2016 03:46 PM, Mark Rutland wrote:
>> On Wed, Nov 23, 2016 at 01:52:22PM +0100, Ralf Ramsauer wrote:
>>> Hi,
>>>
>>> I first noticed that on the LeMaker Hikey: After jailhouse is
>>> (successfully) enabled, the CPU board gets incredibly hot (after a few
>>> seconds), though the root Linux still idles and no cells are created so
>>> far. When jailhouse is disabled again, it immediately cools down within
>>> seconds.
>>
>> I suspect that the issue here is that jailhouse doesn't handle
>> PSCI_CPU_SUSPEND, but the host kernel is trying to use PSCI_CPU_SUSPEND
>> for idle, as the hikey dts has idle states.
>>
>> AFAICT, jailhouse will trap the SMC, but will immediately return
>> PSCI_NOT_SUPPORTED, since psci_dispatch [1] doesn't have a case for
>> PSCI_CPU_SUSPEND. The host then immediately tries PSCI again. We burn
>> CPU cycles jumping back-and-forth when we should be idle.
>>
>> It should be possible to look under sysfs to see how many times a CPU
>> entered/exited PSCI idle states. IIRC there's a directory under
>> /sys/devices/system/cpu/cpu<N>/ with idle residency information.
>>
>> I think jailhouse needs to gain some PSCI_CPU_SUSPEND support. It should
>> be able to at least use WFI safely, and ideally it would call into the
>> real PSCI implementation for deeper states.

Good point! wfi would be simple and safe, but is going into deeper
states side-effect free for other cores? That's always the major concern
about power saving, not only on ARM...

> thanks. That's the issue. These are the cell statistics with
> CONFIG_ARM_CPUIDLE enabled:
> 
> COUNTER                              SUM   PER SEC
> vmexits_psci                    15521049    289782
> 
> So we were exiting almost 300k/sec because of PSCI.
> 
> After disabling CONFIG_ARM_CPUIDLE:
> vmexits_psci                           0         0
> 

Thanks for confirming. It was off here all around.

Jan

> Thanks
>   Ralf
>>
>> Thanks,
>> Mark.
>>
>> [1] 
>> https://github.com/siemens/jailhouse/blob/master/hypervisor/arch/arm-common/psci.c
>>
> 

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to