On 08.09.15 12:37, Savolainen, Petri (Nokia - FI/Espoo) wrote:
-----Original Message-----
From: ext Ivan Khoronzhuk [mailto:[email protected]]
Sent: Tuesday, September 08, 2015 12:20 PM
To: Savolainen, Petri (Nokia - FI/Espoo); [email protected]
Subject: Re: [lng-odp] [API-NEXT PATCH 3/5] linux-generic: cpu: rename
time_cycles to cpu_cycles
On 08.09.15 11:35, Savolainen, Petri (Nokia - FI/Espoo) wrote:
-----Original Message-----
From: ext Ivan Khoronzhuk [mailto:[email protected]]
Sent: Tuesday, September 08, 2015 10:26 AM
To: Savolainen, Petri (Nokia - FI/Espoo); [email protected]
Subject: Re: [lng-odp] [API-NEXT PATCH 3/5] linux-generic: cpu:
rename
time_cycles to cpu_cycles
On 07.09.15 15:41, Petri Savolainen wrote:
Implemented odp_cpu_cycles() be renaming odp_time_cycles()
implementation. Time implementation uses odp_cpu_cycles
temporarely.
Right. You didn't add functional changes here.
Currently It's not documented that odp_time_cycles returns global
cycles ).
But time API does. So question is, on what I should replace this
function for
linux generic. on clock_gettime ? Which impact it will have on
applications/tests/examples?
Do we have choice?
This series does not change time API or functionality of the
implementation,
just adds CPU cycles API. The new time API needs to specify global
wall clock time
and implement it so that it's globally synchronized (==> not use CPU
cycles counter
any more, if those counters are not kept in sync by the HW)
+, or can be impacted by freq change.
I'm afraid that it will be smth similar to timer API s/w counter.
Which has not very good resolution for short time measurements.
Do we have direct access to counters in linux-generic cases, like it's
done for cycles?
It depends on HW and default access rights (linux) on the platform - but, yes
some platforms
will provide direct read access to the global time counter.
I think an arch/linux implementation is enough for linux-generic at the moment.
Current implementation is for local counter only.
For now maybe it's enough to use it as global?
I agree to not touch it for now, and don't know correct substitution for that
at this moment.
HW specific (arch/xxx) implementations can be added later on.
-Petri
--
Regards,
Ivan Khoronzhuk
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp