Using rdtsc to timestamp RTT of packets
fwefew 4t4tg
7532yahoo at gmail.com
Mon Mar 6 18:33:06 CET 2023
Using rdtsc to timestamp RTT of packets
Stephen/Gabor/Harry: Gents thanks for the guidance; this mailing list is
great. The message is rdtsc is just fine. Got it.
The command line (from Harry):
>lscpu | egrep "constant_tsc|nonstop_tsc"
is operationally ideal: specific, easy, and answers the issue of
invariance/constancy clearly.
On Mon, Mar 6, 2023 at 11:56 AM Stephen Hemminger <
stephen at networkplumber.org> wrote:
> On Sun, 5 Mar 2023 20:01:15 -0500
> fwefew 4t4tg <7532yahoo at gmail.com> wrote:
>
> > I think rdtsc does all this. But then I read [1]:
> >
> > - The TSC is not always invariant
> > - And of course context switches (if a thread is not pinned to a core)
> > will invalidate any time difference
> > - The TSC is not incremented when the processor enters a deep sleep. I
> > don't care about this because I'll turn off the power saving modes
> anyway
>
> Stack Overflow is only one step better than ChatGPT in giving
> partially correct answers.
>
> TSC is almost always works well on modern processors.
> The Linux kernel aligns all the TSC values for each core at boot up.
> It is invariant (derived from a single clock source) unless you have some
> poorly designed NUMA system. In the past, there were some CPU's that
> did bad things during suspend, but that is fixed in current generations.
>
> Bottom line: that advice is no longer true.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/users/attachments/20230306/fff9c4d6/attachment.htm>
More information about the users
mailing list