From: Isaac Boukris <iboukris@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: users@dpdk.org
Subject: Re: Accuracy of rte_get_tsc_hz() compared to linux
Date: Sat, 21 Sep 2024 09:36:24 +0300 [thread overview]
Message-ID: <CAC-fF8RqRc+BEkvu7734LZ48hc41bZ0h+Mu30ACDvb2PSht5-w@mail.gmail.com> (raw)
In-Reply-To: <CAC-fF8QeW7xyORbz2rD4O92Qj_oDSfF22Bz4RtqX1TainqWKVA@mail.gmail.com>
> > Really getting better value would require some sort of repeated check
> > (maybe an alarm callback), and using cpu value as a starting point.
>
> In practically all my tests, on machines without tsc_known_freq, the
> value determined by our linux estimation code with rounding lowered to
> 1KHz, was much better (closer to kernel value, actually exact the
> kernel value except one case where they differed in a couple of KHz).
> What would repeated tests give us? I don't think the kernel value
> changes, does it?
Looking at the kernel code, there is a mention of a watchdog but it
seems mostly disabled for TSC based on cpu flags (and it doesn't seem
to change on the systems I'm testing).
> In fact I think we should lower the rounding in our linux estimation
> code to 1KHz (and its time from 100ms to 200ms, just to be on the safe
> side, the kernel does a full second), as well as lower the rounding of
> our common code to 1MHz. This will simply be more accurate.
Increasing the test time to 200ms or even a full second doesn't seem
to provide any improvement, so I'll keep it at 100ms and round it at
10KHz (close to the margin error).
next prev parent reply other threads:[~2024-09-21 6:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-18 22:04 Isaac Boukris
2024-09-18 23:27 ` Stephen Hemminger
2024-09-19 9:37 ` Isaac Boukris
2024-09-19 12:26 ` Isaac Boukris
2024-09-19 13:04 ` Isaac Boukris
2024-09-19 18:33 ` Isaac Boukris
2024-09-19 21:53 ` Stephen Hemminger
2024-09-19 22:02 ` Stephen Hemminger
2024-09-19 22:21 ` Stephen Hemminger
2024-09-20 3:19 ` Isaac Boukris
2024-09-20 14:39 ` Stephen Hemminger
2024-09-20 15:06 ` Isaac Boukris
2024-09-21 6:36 ` Isaac Boukris [this message]
2024-09-20 7:26 ` David Marchand
2024-09-20 14:36 ` Stephen Hemminger
2024-09-20 15:11 ` Isaac Boukris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAC-fF8RqRc+BEkvu7734LZ48hc41bZ0h+Mu30ACDvb2PSht5-w@mail.gmail.com \
--to=iboukris@gmail.com \
--cc=stephen@networkplumber.org \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).