[Cbe-oss-dev] [rfc] spufs: support multi-platform priv1 access
Geoff Levand
geoffrey.levand at am.sony.com
Sat Apr 22 04:18:10 EST 2006
Benjamin Herrenschmidt wrote:
>> +static const struct spu_priv1_ops priv1_ops =
>> +{
>> + .int_mask_and = int_mask_and,
>> + .int_mask_or = int_mask_or,
>> + .int_mask_set = int_mask_set,
>> + .int_mask_get = int_mask_get,
>> + .int_stat_clear = int_stat_clear,
>> + .int_stat_get = int_stat_get,
>> + .int_route_set = int_route_set,
>> + .mfc_dar_get = mfc_dar_get,
>> + .mfc_dsisr_get = mfc_dsisr_get,
>> + .mfc_dsisr_set = mfc_dsisr_set,
>> + .mfc_sdr_set = mfc_sdr_set,
>> + .mfc_sr1_set = mfc_sr1_set,
>> + .mfc_sr1_get = mfc_sr1_get,
>> + .mfc_tclass_id_set = mfc_tclass_id_set,
>> + .mfc_tclass_id_get = mfc_tclass_id_get,
>> + .smm_pgsz_set = smm_pgsz_set,
>> + .tlb_invalidate = tlb_invalidate,
>> + .resource_allocation_groupID_set = resource_allocation_groupID_set,
>> + .resource_allocation_groupID_get = resource_allocation_groupID_get,
>> + .resource_allocation_enable_set = resource_allocation_enable_set,
>> + .resource_allocation_enable_get = resource_allocation_enable_get,
>> +};
>
> Looks a bit too fine-grained to me... we'll pay a very high overhead if
> we need to do an indirect function call for example for getting the DAR,
> the DSISR, etc... We should probably invent a smarter API that allows to
> get more than one of those at once in cases where it makes sense
> (typically like DAR/DSISR) or better, get a higher level API in place.
I went through the spufs code looking at each place these are used,
and came out questioning if much could be gained by changes at this
level. As you hint at, I think the proper thing to do is to work on
optimization at the spufs function level. I have no plan to do this,
but will keep it in mind and try to get some profiling data when I
have a chance.
Arnd, could you say if you have any plan for spufs optimization work.
-Geoff
More information about the cbe-oss-dev
mailing list