[Cbe-oss-dev] [PATCH] fix physical spu utilization statistics

Jeremy Kerr jk at ozlabs.org
Thu Jul 5 16:41:54 EST 2007


Hi Luke,

Looks like the whitespace has still been mangled :(

Whitespace aside, all looks good to me - just a couple of comments:

> +        spuctx_switch_state(ctx, SPUCTX_UTIL_USER);
> +	mb();

scripts/checkpatch.pl complains about mb() not having a comment.


> + * Must be kept in sync with spu_utilization_state.
>   */
> -enum spuctx_execution_state {
> +enum spuctx_utilization_state {
>  	SPUCTX_UTIL_USER = 0,
>  	SPUCTX_UTIL_SYSTEM,
>  	SPUCTX_UTIL_IOWAIT,
> -	SPUCTX_UTIL_LOADED,
> +	SPUCTX_UTIL_LOADED,	/* mapped to SPU_UTIL_IDLE at system spu level*/
>  	SPUCTX_UTIL_MAX 
>  };

and:

>  enum spu_utilization_state {
> -	SPU_UTIL_SYSTEM,
>  	SPU_UTIL_USER,
> +	SPU_UTIL_SYSTEM,
>  	SPU_UTIL_IOWAIT,
>  	SPU_UTIL_IDLE,
>  	SPU_UTIL_MAX

Since they need to be kept in sync, can we just share one enum?

Christoph - with this patch, are you OK with the stats file 
implementation?

Cheers,


Jeremy



More information about the cbe-oss-dev mailing list