3 ms·
> What applications can you imagine would make so many clock calls so as to incur noticeable overhead? Low latency processing or realtime-ish applications. If
by rdtsc 9y ago
> What applications can you imagine would make so many clock calls so as to incur noticeable overhead?
Low latency processing or realtime-ish applications. If you have a budget of a few milliseconds only, lots of gettimeofday can start to add up. Now true that nowadays they are mostly vDSO so it doesn't matter as much. I remember before they were we saw a decent speedup when we upgraded to vDSO kernel version.
> But to answer your question directly, the ability to access the clock in a shared memory segment can itself be reified as a handle that's granted to a process.
rdtsc is not shared memory but more like a register read. Though it is a virtualized instruction so on proper VMs (not a container) it is possible to control what the guest sees as the value.
- naasking 9y agoIndeed, but then access to a realtime clock factory should be reified as a handle. You would have to be given this handle and explicitly invoke it to install access to the clock if that's needed. The point being, a handle should be involved at some point in order to make the access control explicit and not implicit and ambient.