[Skiboot] [PATCH v2 5/9] Track how long we spend spinning waiting for resource to be loaded
Joel Stanley
joel at jms.id.au
Thu May 7 16:30:39 AEST 2015
On Wed, May 6, 2015 at 1:30 PM, Stewart Smith
<stewart at linux.vnet.ibm.com> wrote:
> This should help us capture (in skiboot log) how long we spend waiting
> for resources to load from flash/FSP.
>
> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
Reviewed-by: Joel Stanley <joel at jms.id.au>
> ---
> core/platform.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/core/platform.c b/core/platform.c
> index 2a29a7e..dec7e96 100644
> --- a/core/platform.c
> +++ b/core/platform.c
> @@ -110,12 +110,16 @@ int resource_loaded(enum resource_id id, uint32_t idx)
> int wait_for_resource_loaded(enum resource_id id, uint32_t idx)
> {
> int r = resource_loaded(id, idx);
> + int waited = 0;
>
> while(r == OPAL_BUSY) {
> opal_run_pollers();
> time_wait_ms_nopoll(5);
Any reason not to collapse these into time_wait_ms(5)?
> + waited+=5;
> r = resource_loaded(id, idx);
> }
>
> + prlog(PR_TRACE, "PLATFORM: wait_for_resource_loaded %x/%x %u ms\n",
> + id, idx, waited);
I would expect this to show the actual time spent in the loop?
> return r;
> }
More information about the Skiboot
mailing list