[Skiboot] [RFC PATCH] core/opal: Add OPAL call statistics

Naveen N. Rao naveen.n.rao at linux.ibm.com
Fri Mar 13 01:09:41 AEDT 2020


Cédric Le Goater wrote:
> On 2/29/20 10:27 AM, Nicholas Piggin wrote:
>> Cédric Le Goater's on February 29, 2020 4:34 am:
>>> Here is a proposal to collect OPAL call statistics, counts and duration,
>>> and track areas we could possibly improve.
>>>
>>> With a small Linux driver to dump the stats in debugfs, here is what
>>> we get on a P9 after boot:
>> 
>> Seems interesting... you could just do it all on the Linux side though.
> 
> I thought we might collect more data from OPAL in opal_exit. 

As Nick points out, this can be done from Linux through the use of 
tracepoints. We already have similar statistics for hcalls through a 
perf script. A similar script should be able to support OPAL calls.

See:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/scripts/python/powerpc-hcalls.py

> 
>> Any reason you want these stats? 
> 
> HW configuration (XIVE) is in mind but it could be applied to other 
> areas.
> 
> 1. To see which calls are being used and how frequently 
> 2. to track average and max values which would reflect issues in 
>    OPAL, locking or polling.
> 3. to see impact of some changes
> 
>> I'd like to try get basic perf and possibly even ftrace support for 
>> OPAL (driven from Linux). It's still a way off but coming along slowly.

By 'perf', do you mean PMU support?
I guess we already have basic _mcount() support in skiboot. Do you plan 
to have this data be fed to Linux ftrace in some manner? Would be good 
to hear your plans.


Thanks,
Naveen



More information about the Skiboot mailing list