From: Bruce Richardson <bruce.richardson@intel.com>
To: Isaac Boukris <iboukris@gmail.com>
Cc: <dev@dpdk.org>, <stephen@networkplumber.org>,
Tyler Retzlaff <roretzla@linux.microsoft.com>,
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
<david.marchand@redhat.com>
Subject: Re: [PATCH 2/2] timer/linux: override TSC freq if no tsc_known_freq
Date: Mon, 30 Sep 2024 16:04:23 +0100 [thread overview]
Message-ID: <Zvq998FZCH0mnPZo@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <CAC-fF8Q+2BL=gCxgWkqMf=24r0gAcoaB=Tfgvd8Dd-TzSt1BZg@mail.gmail.com>
On Tue, Sep 24, 2024 at 08:04:00PM +0300, Isaac Boukris wrote:
> Perhaps this was a bit hastily, I got an automated failure report on
> "arm64-native-linuxapp-gcc":
>
> https://lab.dpdk.org/results/dashboard/patchsets/31106/
>
That might be a false positive failure. I don't see how this patch could
cause issues for a single ip reassembly test case.
> Not sure which patch caused the problem, looking at the kernel code it
> looks like 'tsc_known_freq' is only set for x86 arch, but it could be
> the other patch and maybe lowering the rounding to 10KHz is too
> aggressive, maybe better 100KHz or 1MHz.
I don't see why we can't put an #ifdef in the code to always return true on
non-x86 platforms. [Or if we don't want an #ifdef, we can always use 'if
(strcmp(RTE_ARCH,"x86_64") && strcmp(RTE_ARCH,"i686"))' :-)]
Don't really have a strong opinion on the rounding, maybe others do. [Since
you give 3 options, I'm going to suggest going for the middle one -
100KHz!]
>
> As an alternative to 'tsc_known_freq' detection, maybe just provide an
> init parameter to set the frequency manually, along with some
> known-issue documentation.
>
> Maybe we should just allow to specify the frequency as a parameter at init
I don't think that is a great solution, better to detect the frequency if
we can.
An interesting future enhancement would be to update DPDK to work with [1],
where we read the tsc value directly from the kernel. According to that
project, this is already available on Google production kernels, though
not generally elsewhere. For those who care about having accurate TSC values,
or faster startup times, having the extra kernel module to read the TSC
value directly might be worthwhile.
Regards,
/Bruce
[1] https://github.com/trailofbits/tsc_freq_khz
next prev parent reply other threads:[~2024-09-30 15:04 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-21 14:00 [PATCH 1/2] timer/linux: lower rounding of tsc estimation to 10KHz Isaac Boukris
2024-09-21 14:00 ` [PATCH 2/2] timer/linux: override TSC freq if no tsc_known_freq Isaac Boukris
2024-09-24 17:04 ` Isaac Boukris
2024-09-30 15:04 ` Bruce Richardson [this message]
2024-09-30 22:08 ` [PATCH v2 0/2] Improve TSC frequency accuracy on Linux Isaac Boukris
2024-09-30 22:08 ` [PATCH v2 1/2] timer/linux: lower rounding of tsc estimation to 100KHz Isaac Boukris
2024-09-30 22:08 ` [PATCH v2 2/2] timer/linux/x86: override TSC freq if no tsc_known_freq Isaac Boukris
2024-10-01 0:10 ` Stephen Hemminger
2024-10-01 0:22 ` [PATCH v3 0/2] Improve TSC frequency accuracy on Linux Isaac Boukris
2024-10-01 0:22 ` [PATCH v3 1/2] timer/linux: lower rounding of tsc estimation to 100KHz Isaac Boukris
2024-10-01 15:18 ` Stephen Hemminger
2024-10-01 0:22 ` [PATCH v3 2/2] timer/linux/x86: override TSC freq if no tsc_known_freq Isaac Boukris
2024-10-01 15:19 ` Stephen Hemminger
2024-10-01 21:56 ` Isaac Boukris
2024-10-01 20:01 ` Bruce Richardson
2024-10-01 21:59 ` Isaac Boukris
2024-10-02 8:06 ` Bruce Richardson
2024-10-02 16:56 ` [PATCH v4 0/2] Improve TSC frequency accuracy Isaac Boukris
2024-10-02 16:56 ` [PATCH v4 1/2] timer: lower rounding of TSC estimation to 100KHz Isaac Boukris
2024-10-02 16:56 ` [PATCH v4 2/2] timer: allow platform to override cpu TSC frequency Isaac Boukris
2024-10-02 17:11 ` Bruce Richardson
2024-10-02 19:14 ` Isaac Boukris
2024-10-03 9:31 ` Bruce Richardson
2024-10-03 12:29 ` Isaac Boukris
2024-10-02 17:12 ` [PATCH v4 0/2] Improve TSC frequency accuracy Bruce Richardson
2024-10-03 12:26 ` [PATCH v5 " Isaac Boukris
2024-10-03 12:26 ` [PATCH v5 1/2] timer: lower rounding of TSC estimation to 100KHz Isaac Boukris
2024-10-03 14:05 ` Bruce Richardson
2024-10-03 15:13 ` Stephen Hemminger
2024-10-08 7:56 ` David Marchand
2024-10-03 12:26 ` [PATCH v5 2/2] timer: allow platform to override cpu TSC frequency Isaac Boukris
2024-10-03 14:06 ` Bruce Richardson
2024-10-03 15:14 ` Stephen Hemminger
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=Zvq998FZCH0mnPZo@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=iboukris@gmail.com \
--cc=roretzla@linux.microsoft.com \
--cc=stephen@networkplumber.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).