DPDK patches and discussions
 help / color / mirror / Atom feed
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

      reply	other threads:[~2024-09-30 15:04 UTC|newest]

Thread overview: 4+ 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]

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).