Hi all, I am taking this card which is about CPU frequency API: https://pmo-portal.linaro.org/jira/browse/ODP-73
Since this should new API to replace the old pseudo codes, I'd like to discuss what the APSs should be like. Problems and solutions what I can imagine may be: 1# Different CPUs may run at different frequencies; [Solution]: We get frequency data per CPU, e.g. the API returns frequency of the CPU on which it is running. 2# Frequency for one CPU may change if this feature turned on; [Solution]: We init a global data array which contains max and min frequencies of all CPUs, as to the current frequency, we don't store it since it changes, we can get it by API for above 1# 3# Thread may be scheduled from one CPU to another, then the current frequency got by API 1# may be obsolete. [Solution]: No solution? API only returns correct data at the time being called, the user should be responsible for refresh data if needed. 4# CPUs may be plugged out [Solution]: Its max and min frequencies are stored by above API 2#, then we don't care this any more? 5# CPUs may be divided into data plane and control planes, what should the variable cpu_number stand for, total CPUs number or only CPUs in data plane? [Solution]: T.B.D. Do we need both number? it seems better but not sure if necessary or not. 6# Which types should these APIs be, static or external? [Solution]: T.B.D. So APIs as I can predict should be like: uint64_t odp_sys_cpu_freq_curr(int cpu) //get current CPU frequency (TBD) odp_sys_cpu_frequencies(TBD) //init an array which contains max and min greq of all CPUs, there are something to be defined if we decide to do so, e.g global static array or dynamically allocated memory should be used etc. If you have any ideas/comments about this, please raise them, or else, I will send out the draft patches then you can review them in line. Thanks. _______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
